PHP Telegram Bot with Novagram

We have announced yesterday our PHP Telegram bot, so today we wanted to share with you an elegant and reliable PHP library to create your telegram Bots or services. The library support all the Methods and Types implemented in Bot Api 5.0 including the local Bot API. It support for JSON payload, and async handling of updates, which make it fast and extendable with Prototypes, so you can add your custom functionalities.

Novagram is very easy to use exactly like original Bot Api, with many methods simplified in a very nice way. If you are not yet familiar with Bot API so you will have to simply follow the documentation to create your PHP Telegram Bots solution. It provides many features out of the box including Conversations, Entities Parser and getDC. Finally the library is secure, when using Webhooks, there is a Built-in Telegram IP Check, that works with Cloudflare too.

Sample PHP Telegram bot notification

Creating a simple PHP Telegram Bot

The code below will create a simple PHP Telegram bot that will create two commands start and info,

use skrtdev\NovaGram\Bot;
use skrtdev\Telegram\Message;

$Bot = new Bot("YOUR_TOKEN");

$Bot->onCommand("start", function (Message $message) use ($Bot) {
    $message->reply("Hey! Nice to meet you. Use /info to know more about me.");
});

$Bot->onCommand("info", function (Message $message) use ($Bot) {
    $message->reply("Well, I'm just an example, but you can learn more about NovaGram at docs.novagram.ga");
});

NovaGram is built in order to bring a lightweight alternative to make bots, so that it is simple for beginners, but powerful for who already knows how to implement it. So it’s not just another PHP Telegram bots implementation as there are many already available, but it try to make it simple to use for beginners, in the same time powerful for novice users.

Novagram is an open source software to create PHP Telegram bots, released under an MIT license. More information at https://docs.novagram.ga/

Join us on Instagram at https://t.me/Phpmagbot

LEAVE A REPLY

Please enter your comment!
Please enter your name here