PHPackages                             dratejinn/telegrambot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dratejinn/telegrambot

ActiveLibrary[API Development](/categories/api)

dratejinn/telegrambot
=====================

A Telegram bot api

v2.0.0(1y ago)319.4k↓33.3%3MITPHPPHP ^7.4 || ^8.0

Since Apr 30Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Dratejinn/telegrambot)[ Packagist](https://packagist.org/packages/dratejinn/telegrambot)[ RSS](/packages/dratejinn-telegrambot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (20)Used By (0)

Telegram bot API
================

[](#telegram-bot-api)

[![Code documented](https://camo.githubusercontent.com/9f02dfd802689b0b436036d73b868afaa991203630815d1d909e8bdfba406b89/68747470733a2f2f636f6465646f63732e78797a2f44726174656a696e6e2f74656c656772616d626f742e737667)](https://codedocs.xyz/Dratejinn/telegrambot/)

A PHP 7.0+ Telegram bot API used to create bots for Telegram. For more information check [Telegrams bot API](https://core.telegram.org/bots/api)

Base API
--------

[](#base-api)

The basis of the bot API can be found in [src/API](https://github.com/Dratejinn/telegrambot/tree/master/src/API). The structure reflects telegrams API as much as possible.

### Basic examples

[](#basic-examples)

All sendable objects have a `->call(\Telegram\API\Bot $bot)` method which can be used to send the object to the telegram API. Some examples can be found in [Examples/Examples.php](https://github.com/Dratejinn/telegrambot/blob/master/Examples/Example.php)

**sending a chatmessage**

```
