PHP code example of wearesho-team / telegram-message-delivery
1. Go to this page and download the library: Download wearesho-team/telegram-message-delivery library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wearesho-team / telegram-message-delivery example snippets
use Wearesho\Delivery;
/** @var \TgBotApi\BotApiBase\ApiClient $apiClient */
/** @var Delivery\Telegram\ConfigInterface $config */
$botApi = new Delivery\Telegram\BotApi(
$config,
$apiClient,
new \TgBotApi\BotApiBase\BotApiNormalizer()
);
$service = new Delivery\Telegram\Service($botApi);
$service->send(new Delivery\Message('message content', 'chat id'));