feat: new chain
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Telegram\Handlers;
|
||||
|
||||
use App\Telegram\TelegramBotContext;
|
||||
use SergiX44\Nutgram\Nutgram;
|
||||
|
||||
class HelpCommand
|
||||
{
|
||||
public function __construct(
|
||||
private readonly TelegramBotContext $context,
|
||||
) {}
|
||||
|
||||
public function __invoke(Nutgram $bot): void
|
||||
{
|
||||
$lines = [
|
||||
'📖 可用指令(仅指定群管理员)',
|
||||
'',
|
||||
'/help',
|
||||
' 查看本帮助',
|
||||
'',
|
||||
'/ping',
|
||||
' 健康检查',
|
||||
'',
|
||||
'/data [1|7|30] [channelId]',
|
||||
' 查询访问统计(同仪表盘)',
|
||||
' 天数默认当天;渠道默认全部',
|
||||
' 例: /data',
|
||||
' 例: /data 7',
|
||||
' 例: /data 30 <channelId>',
|
||||
'',
|
||||
'/channel',
|
||||
' 列出渠道:ID、备注、归属;点按钮复制链接',
|
||||
];
|
||||
|
||||
if ($this->context->isOfficial()) {
|
||||
$lines = array_merge($lines, [
|
||||
'',
|
||||
'/transfer <fromAddress> [TRX|USDT|ETH|BTC] [amount]',
|
||||
' 从设备地址转出到配置收款地址(仅官方)',
|
||||
' 按地址识别链:T…=Tron,0x…=ETH,1…/3…/bc1…=BTC',
|
||||
' 省略 amount 则转全部;默认 Tron→USDT / ETH→ETH / BTC→BTC',
|
||||
' 例: /transfer Txxx USDT 10',
|
||||
' 例: /transfer 0x… ETH',
|
||||
' 例: /transfer 1… BTC 0.01',
|
||||
]);
|
||||
} else {
|
||||
$lines = array_merge($lines, [
|
||||
'',
|
||||
'(当前为代理机器人:仅可查看本代理渠道数据,不支持 /transfer)',
|
||||
]);
|
||||
}
|
||||
|
||||
$bot->sendMessage(implode("\n", $lines));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user