Skip to main content
Version: 1.x

Latest Version on Packagist Test Suite Maintainability Total Downloads API License

The Telegram bot library that doesn't drive you nuts

Taking advantage of the PHP8 features, thi framework and tries to make the speed, scalability and flexibility of use its strength, allowing to quickly make simple bots, but at the same time, it provides more advanced features to handle even the most complicated flows. Some architectural concepts on which Nutgram is based are heavily influenced by other open source projects such as Botman and Zanzara.

<?php

use SergiX44\Nutgram\Nutgram;

$bot = new Nutgram($_ENV['TOKEN']);

$bot->onCommand('start', fn(Nutgram $bot) => $bot->sendMessage('Ciao!'));

$bot->onText('My name is {name}', fn(Nutgram $bot, $name) => $bot->sendMessage("Hi {$name}"));

$bot->run();