承接 rgzone/telegram-bot-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rgzone/telegram-bot-bundle

Composer 安装命令:

composer require rgzone/telegram-bot-bundle

包简介

Symfony bundle to inject the most popular Telegram Bot API implementations

README 文档

README

Symfony Bundle to autowire most used Telegram Bot API implementations.

Table of Contents

Install

$ composer require rgzone/telegram-bot-bundle
<?php // config/bundles.php

return [
    // ...
    RGZ\TelegramBotBundle\RGZTelegramBundle::class => ['all' => true],
];

Configure

# config/packages/rgz_telegram.yaml

rgz_telegram:
    bot:
        name: bot
        token: '%env(TG_TOKEN)%'
# config/packages/rgz_telegram.yaml

rgz_telegram:
    default_bot: default
    bots:
        main:
            token: '%env(TG_TOKEN_MAIN)%'
        default:
            token: '%env(TG_TOKEN_DEFAULT)%'
        logger:
            token: '%env(TG_TOKEN_LOGGER)%'

Suggested packages

Usage

Install suggestions

$ composer require telegram-bot/api:^2.3
$ composer require irazasyed/telegram-bot-sdk:^3.3
$ composer require longman/telegram-bot:0.64.*
$ bin/console debug:autowiring --all | grep Telegram

 Longman\TelegramBot\Telegram (rgzone.telegram_bot.any_name.bot_lng)
 Longman\TelegramBot\Telegram $anyName (rgzone.telegram_bot.any_name.bot_lng)
 Longman\TelegramBot\Telegram $botMain (rgzone.telegram_bot.bot_main.bot_lng)
 Longman\TelegramBot\Telegram $logger (rgzone.telegram_bot.logger.bot_lng)
 TelegramBot\Api\BotApi (rgzone.telegram_bot.any_name.bot_api)
 TelegramBot\Api\BotApi $anyName (rgzone.telegram_bot.any_name.bot_api)
 TelegramBot\Api\BotApi $botMain (rgzone.telegram_bot.bot_main.bot_api)
 TelegramBot\Api\BotApi $logger (rgzone.telegram_bot.logger.bot_api)
 Telegram\Bot\Api (rgzone.telegram_bot.any_name.bot_sdk)
 Telegram\Bot\Api $anyName (rgzone.telegram_bot.any_name.bot_sdk)
 Telegram\Bot\Api $botMain (rgzone.telegram_bot.bot_main.bot_sdk)
 Telegram\Bot\Api $logger (rgzone.telegram_bot.logger.bot_sdk)
# config/services.yaml

services:
    _defaults:
        bind:
            $testChatId: '%env(TG_CHAT_ID_TEST)%'
<?php // src/Command/TestCommand.php

namespace App\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

use TelegramBot\Api\BotApi;
use Telegram\Bot\Api;
use Longman\TelegramBot\Telegram;
use Longman\TelegramBot\Request;

class TestCommand extends Command
{
    protected static $defaultName = 'app:test';

    protected BotApi $defaultBot;
    protected Api $firstBot;
    protected Telegram $secondBot;
    protected int $testChatId;

    public function __construct(BotApi $randomName, Api $botMain, Telegram $logger, int $testChatId)
    {
        parent::__construct();
        $this->defaultBot = $randomName;
        $this->firstBot = $botMain;
        $this->secondBot = $logger;
        $this->testChatId = $testChatId;
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $this->defaultBot->sendMessage(
            $this->testChatId,
            'Delivered by "<b>telegram-bot/api</b>"',
            'HTML'
        );

        $this->firstBot->sendMessage([
            'chat_id' => $this->testChatId,
            'text' => 'Delivered by "<b>irazasyed/telegram-bot-sdk</b>"',
            'parse_mode' => 'HTML',
        ]);

        Request::initialize($this->secondBot);
        Request::sendMessage([
            'chat_id' => $this->testChatId,
            'text' => 'Delivered by "<b>longman/telegram-bot</b>"',
            'parse_mode' => 'HTML',
        ]);

        return Command::SUCCESS;
    }
}

rgzone/telegram-bot-bundle 适用场景与选型建议

rgzone/telegram-bot-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 rgzone/telegram-bot-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 rgzone/telegram-bot-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 rgzone/telegram-bot-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-07