Skip to content
프로젝트

소개

당신을 골치 아프게 하지 않는 Telegram 봇 프레임워크입니다.

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • Latest PHP 8.4 features
  • Framework agnostic
  • Vanilla PHP Starter Kit
  • Framework integrations (Laravel and Symfony)

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

SWUbanner


API Latest Version on Packagist PHP License

Packagist Downloads Packagist Downloads GitHub Issues GitHub Pull Requests

Test Suite Maintainability Test Coverage

Documentation StarterKit 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

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.4 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 Telegram Bot API Support Up To Support Until
^3.0 ^8.0 api EOL
^4.0 ^8.2 api EOL
^5.0 ^8.4 api 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.

관련 프로젝트 살펴보기

불러오는 중…