mvs / phbot
PHP Library for Telegram Bots
1.0.0
2018-05-11 14:51 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2025-04-14 21:13:46 UTC
README
Connect API Telegram
$app = new ApiConnectTelegram([ 'token' => '<SEU TOKEN>' ]);
Use get update Message
try { $request = $app->getUpdates(); } catch (\Exception $exception) { echo $exception->getMessage(); }
Use Send Message
$data = [ 'chat_id' => 0, 'text' => '<SUA MENSAGEM>' ]; try { $request = $app->sendMessage($data); } catch (\Exception $exception) { echo $exception->getMessage(); }
License
A biblioteca Phbot é um software de código aberto licenciado sob a licença MIT license.