appzz / telegram-message
Send telegram message via bot and curlclient library
1.0.2
2024-12-19 10:23 UTC
Requires
- php: >=5.6
- appzz/arr: 1.*
- appzz/curl-client: 3.*
This package is auto-updated.
Last update: 2024-12-19 10:23:56 UTC
README
Send messages to tg group via bot
Preparing
- Create a bot
- Get the bot's API token from @BotFather
- Add your bot to the chat you'll be sending messages to
- Get the ID of the chat : https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates
Usage
<?php
$tg = TelegramMessage::factory ();
$tg->token('00000000000000000000000000000000000000000000000');
$tg->chat_id('-0000000000000000000');
//$tg->markdown();
$tg->text("Ut semper!!!");
//$tg->silent(true);
$result = $tg->send();
?>