This commit is contained in:
hashbro
2026-08-08 05:09:01 +08:00
parent 03a40105fc
commit 74a67c3900
523 changed files with 669 additions and 5965 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
/** @var SergiX44\Nutgram\Nutgram $bot */
use App\Telegram\Handlers\PingCommand;
use App\Telegram\Handlers\TransferCommand;
use App\Telegram\Middleware\AuthorizedChat;
use App\Telegram\Middleware\GroupAdminOnly;
$bot->group(function ($bot) {
$bot->onCommand('ping', PingCommand::class)
->description('Health check');
// Single capture — TransferCommand parses "<from> [asset] [amount]".
$bot->onCommand('transfer {args}', TransferCommand::class)
->where('args', '.+')
->description('Transfer TRX or USDT from a device address (omit amount = all)');
})
->middleware(GroupAdminOnly::class)
->middleware(AuthorizedChat::class);