mvs/phbot

PHP Library for Telegram Bots

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mvs/phbot

1.0.0 2018-05-11 14:51 UTC

This package is auto-updated.

Last update: 2025-09-14 22:01:24 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.