chipslays/litegram 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

chipslays/litegram

Composer 安装命令:

composer require chipslays/litegram

包简介

Simple, flexible, modular library for Telegram Bot Api.

README 文档

README

GitHub Workflow Status GitHub

v3.x under wip, but can usable.

Simple, flexible, modular library based on events for Telegram Bot Api.

Litegram can be used as a regular lightweight library or as a framework with added of plugins.

⭐ Features

  • Events based (Routing);
  • Cache (Redis, Memcached);
  • Database (based on Laravel Database + Eloquent);
  • Middlewares;
  • Localization (based on Phrase);
  • Sessions (based on Storage plugin);
  • Storage (Flat files, Database drivers);
  • Talk (Chain Conversation);
  • Validation (based on Respect/Validation);
  • Stemming;
  • Plugins and Components;
  • Supports Webhooks & Simple Long-polling (not async);

🔩 Installation

Install via Composer:

$ composer require chipslays/litegram

📁 Litegram Project

You can use a ready-made and configured project for a quick start.

See more information here.

1️⃣ Create project:

composer create-project chipslays/litegram-project SuperDuperBot

2️⃣ Change the parameters of the configs and finally type in Terminal:

php lite webhook:set
php lite migration:up

🎉 Congratulation, bot project was set up.

💡 Examples

require 'vendor/autoload.php';

$bot = bot($config)->webhook();

$bot->command('start', function () use ($bot) {
    $bot->ask('What is your name?', function () use ($bot) {
        $name = $bot->payload('message.text');
        $bot->reply("👋 Nice to meet you, {$name}!");
    });
});

// or
$bot->command('start', 'BotController@startConversation');

$bot->run();

Note: Method ask work correctly only if storage driver set as file.

More examples you can see here.

📖 Documentation

Documentation can be found here.

🧩 VS Code Extension

Install Litegram Snippets extension for VS Code to increase productivity.

🔑 License

Released under the MIT public license. See the enclosed LICENSE for details.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固