mvs/phbot

PHP Library for Telegram Bots

1.0.0 2018-05-11 14:51 UTC

This package is auto-updated.

Last update: 2024-02-14 18:50:41 UTC


README

phbot_logo.png

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.