tauweb / simple-telegram-bot-api
Simple php telegram bot api
0.1
2021-05-27 11:06 UTC
This package is auto-updated.
Last update: 2025-05-10 23:33:05 UTC
README
An easy way to use Telegram Bot Api. Works with all Telegram methods.
Install
composer require tauweb/simple-telegram-bot-api
Usage example
$bot = new Bot('Your Bot Token'); $bot->sendMessage([ 'chat_id' => 11111, 'text' => 'Hello, World', ]); $bot->sendPhoto([ 'chat_id' => 11111, 'photo' => 'http://url_to_image.jpg, ]);
or
$result = (new Bot('Your Bot Token'))->setWebHook(['url' => 'https://bot_webhook_url']); var_dump($result);
or
(new Bot('Your Bot Token'))->getChatMember(['chat_id' => 111, 'user_id' => 222]);