{"repo":"muhammadmp97/TeleBot","free":true,"listed":false,"github":"https://github.com/muhammadmp97/TeleBot","clone":"git clone https://github.com/muhammadmp97/TeleBot.git","description":"A minimal library to develop your new Telegram bot 🐘","language":"PHP","stars":54,"topics":["telegram-bot","php-telegram-bot","telegram-sdk","telegram-api","telegram"],"license":"MIT","category":"chat-messaging","readme_excerpt":"TeleBot A minimal library to develop your new Telegram bot Installation composer require webpajooh/telebot How to use Start point We start by creating an instance of TeleBot class: Get the update object There are short ways to access the update object and some important fields. I recommend you to read the official documentation to understand these objects well. You also can use the hasCallbackQuery() method, when you want to check if the update object has a callback query field. Methods Thanks to magic methods, we can use API methods without implementing them, and just call them by name and pass an array as parameter: Router You may define some routes to your bot features; define them by the listen() method: The third parameter that is true by default, makes you able to terminate the script after running a command. In the previous example we passed false so script continues. You can also get parameters and use them as variables: TeleBot translates them to regex, so it will be good to take a look at this table to know how to use them properly: Type TeleBot Regex -- -- -- Digits %d (\\d+) String (Anything but a whitespace) %s (\\S+) Character %c (\\S) Everything including an empty string %p (. ) Logger You may need to log something into a log.txt file: Keyboard TeleBot includes two classes for making keyboards; InlineKeyboard and ReplyKeyboard . Here you see an example: Then you can use it as bellow: Consider that the chunk() method supports more complex orders, just pass an array","default_branch":null,"files":null,"tree":[],"storefront":"/r/muhammadmp97","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/muhammadmp97/TeleBot/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}