novseje / nutgram
nutgram/nutgram for php8.0 & guzzle6
Requires
- php: >=8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.5
- illuminate/macroable: ^8.0|^9.0|^10.0
- laravel/serializable-closure: ^1.2
- league/container: ^4.2
- nutgram/hydrator: ^4.0.1
- psr/log: ^1.0|^2.0|^3.0
- psr/simple-cache: ^1.0|^2.0|^3.0
Requires (Dev)
- ext-reflection: *
- illuminate/testing: ^8.0|^9.0|^10.0
- netresearch/jsonmapper: ^4.0.0
- orchestra/testbench: ^6.0|^7.0|^8.0
- pestphp/pest: ^1.1
- pestphp/pest-plugin-mock: ^1.0
- roave/security-advisories: dev-latest
- vimeo/psalm: ^4.30
This package is not auto-updated.
Last update: 2025-02-01 18:33:39 UTC
README
Nutgram
The Telegram bot framework that doesn't drive you nuts
This framework takes advantage of the latest PHP 8 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. Some architectural concepts on which Nutgram is based are heavily influenced by other open source projects such as Botman and Zanzara, check them out too!
<?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
Usage
Projects with this library
Is your project using Nutgram? Let us know, feel free to add yours!
- AnonyMeet (@AnonyMeetBot) - Anonymous chat bot
- File Converter (@newfileconverterbot) - Convert files to other formats
- Sticker Optimizer (@NewStickerOptimizerBot) - Optimize images for the @stickers bot
- Chat Merger (@ChatMergerBot) - Merge multiple messages into one
- Mermaid Generator (@newmermaidbot) - Generate mermaid diagrams from text
- Voice Transcriber (@voicetranscriberobot) - Transcribe audio messages to text
- Effin Birds (@effinbirdsbot) - Search and send in inline mode images made by https://twitter.com/EffinBirds
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.