定制 fr0000st3r/laravel-tg-wsp-core 二次开发

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

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

fr0000st3r/laravel-tg-wsp-core

最新稳定版本:v1.0.0

Composer 安装命令:

composer require fr0000st3r/laravel-tg-wsp-core

包简介

Un chasis genérico para bots de Telegram y WhatsApp en Laravel.

README 文档

README

STATUS: OPERATIONAL | OWNER: FR0000ST3R | VERSION: 1.0.0

Standardized multi-channel messaging engine for the neon age.

🛰️ EL CHASIS (THE CORE)

Laravel-TG-WSP-Core es una arquitectura modular diseñada para desacoplar la lógica de tus bots de los proveedores de mensajería (Telegram, WhatsApp, etc.).

Permite que tu "Cerebro" (Engine) procese mensajes sin importar de qué red vengan, traduciendo todo a un objeto estandarizado: IncomingMessage.

🛠️ INSTALACIÓN (SYSTEM LINK)

Agrega el repositorio a tu composer.json (o vía Packagist en el futuro):

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/Fr0000st3r/laravel-tg-wsp-core"
    }
],

Luego ejecuta el comando de enlace:

composer require frost/laravel-tg-wsp-core:dev-main

Registra el Provider en bootstrap/providers.php:

return [
    // ...
    Frost\LaravelTGandWSPCore\LaravelTGandWSPCoreServiceProvider::class,
];

🧬 ARQUITECTURA (DATA FLOW)

  1. Adapter: Traduce la entrada específica (Telegram/WhatsApp) a IncomingMessage.
  2. Contracts: Interfaz común para estandarizar los datos (Remitente, Texto, Canal).
  3. AgentEngine: El procesador central que resuelve la respuesta.

Ejemplo de uso en routes/telegram.php:

use Frost\LaravelTGandWSPCore\AgentEngine;
use Frost\LaravelTGandWSPCore\Contracts\IncomingMessage;

$bot->onMessage(function (Nutgram $bot) {
    $engine = app(AgentEngine::class);

    // Normalización del mensaje
    $incoming = new IncomingMessage(
        text: $bot->message()->text,
        senderId: (string) $bot->userId(),
        channel: 'telegram',
        firstName: $bot->message()->from->first_name
    );

    // Respuesta del motor
    $bot->sendMessage($engine->handle($incoming));
});

🕶️ CRÉDITOS

Made with ❤️ by Frost for community.

Powered by Nutgram and Pure Laravel Logic.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-02