Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/walderlansena/phbot

:elephant: PHP Library for Telegram Bots
https://github.com/walderlansena/phbot

bot lib php php7 telegram

Last synced: 25 days ago
JSON representation

:elephant: PHP Library for Telegram Bots

Awesome Lists containing this project

README

        



## Connect API Telegram

```php

$app = new ApiConnectTelegram([
'token' => ''
]);

```
## Use get update Message

```php

try {
$request = $app->getUpdates();
} catch (\Exception $exception) {
echo $exception->getMessage();
}

```

## Use Send Message

```php

$data = [
'chat_id' => 0,
'text' => ''
];

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.