template

SWUbanner


Latest Version on Packagist PHP Total Downloads GitHub API

Test Suite Maintainability Test Coverage

Documentation Laravel Symfony

The Telegram bot framework that doesn’t drive you nuts.

This framework takes advantage of the latest PHP 8.2 features, and tries to make the speed, scalability and flexibility of use its strength, it will allow you to quickly make simple bots, but at the same time, it provides more advanced features to handle even the most complicated flows.

<?php

use SergiX44\Nutgram\Nutgram;

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

$bot->onCommand('start', function(Nutgram $bot) {
    $bot->sendMessage('Ciao!');
});

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

$bot->run();

πŸš€ Installation

You can install the package via composer:

composer require nutgram/nutgram

Looking for a Laravel or Symfony integration? Check out Nutgram Laravel and Nutgram Symfony Bundle.

πŸ‘“ Usage

Official Documentation on https://nutgram.dev/

🧩 Features

πŸ”° Supported versions

Nutgram PHP Support Until
^3.0 ^8.0 EOL
^4.0 ^8.2 On going

✨ Projects with this library

Is your project using Nutgram? Let us know, feel free to add yours!

βš—οΈ Testing

composer test

πŸ“ƒ Changelog

Please see CHANGELOG for more information on what has changed recently.

πŸ… Credits

πŸ“– License

The MIT License (MIT). Please see License File for more information.