定制 xdeenist/nutgram 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xdeenist/nutgram

Composer 安装命令:

composer require xdeenist/nutgram

包简介

The Telegram bot library that doesn't drive you nuts

README 文档

README

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

  • Latest PHP 8.2 features
  • Framework agnostic
  • 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
  • Nutgram Generator to quickly update the framework to the latest Telegram Bot API version (WIP)

🔰 Supported versions

Nutgram PHP Support Until
^3.0 ^8.0 2023-11-26
^4.0 ^8.2 -

✨ 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.

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 69
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-30