百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

nutgram

> 后端框架
开源

一个不会让你疯掉的 Telegram bot 框架。

740 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个不会让你疯掉的 Telegram bot 框架。


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.

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

Check out our official Starter Kit, a plain PHP project with no frameworks, to get up and running fast.

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

Usage

Official Documentation on https://nutgram.dev/

Features

  • Latest PHP 8.2 features
  • Framework agnostic
  • Vanilla PHP Starter Kit
  • Framework integrations (Laravel and Symfony)
  • Cache system (you can use your own cache system that implements PSR-16 CacheInterface)
  • Logging system (you can use your own logger that implements PSR-3 LoggerInterface)
  • Flexible update processing
  • Supports all types and methods according to the last Telegram Bot API update
  • Handlers system
  • Middleware system
  • Grouping system to apply middleware and scopes to multiple handlers
  • Auto-registration of bot commands with scope support
  • Helpers for common tasks and proxy methods for a shorter syntax
  • Storage system for global and user data
  • Enhanced keyboard management
  • Conversations system
  • InlineMenu class for easy creation of inline menu messages
  • Extend Nutgram class and Telegram types with user-created methods
  • Bulk message sending
  • Chunked message sending
  • Using enums where possible
  • Customizable error handling
  • Web Validation
  • Testing system
  • Deep Link helper class
  • Rate Limiting System

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!

  • AnonyMeet (@AnonyMeetBot) - Anonymous chat bot
  • File Converter (@newfileconverterbot) - Convert files to other formats
  • Sticker Optimizer (@NewStickerOptimizerBot) - Optimize images for the @stickers bot
  • Stickerizer (@StickerizerBot) - Create stickers on the fly, via Telegram Mini App.
  • 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
  • Resizer Image (@ResizerTool_bot)] - Resize an image easily

⚗️ Testing

composer test

Changelog

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

Credits

  • Sergio Brighenti
  • Luca Patera
  • All Contributors

License

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

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPapibot-frameworkframeworkhacktoberfest

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架