mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 16:45:35 +08:00
fix CommandManualPlugin blocking annotations
This commit is contained in:
@@ -58,7 +58,7 @@ class CommandManualPlugin extends ZMPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parser->addSpecialParser(BotCommand::class, [$this, 'parseBotCommand']);
|
$parser->addSpecialParser(BotCommand::class, [$this, 'parseBotCommand']);
|
||||||
$parser->addSpecialParser(CommandHelp::class, fn () => false);
|
$parser->addSpecialParser(CommandHelp::class, fn () => true);
|
||||||
|
|
||||||
$this->addBotCommand(
|
$this->addBotCommand(
|
||||||
BotCommand::make('help', 'help', level: 10)
|
BotCommand::make('help', 'help', level: 10)
|
||||||
@@ -89,7 +89,7 @@ class CommandManualPlugin extends ZMPlugin
|
|||||||
{
|
{
|
||||||
$this->commands[$command->name] = $command;
|
$this->commands[$command->name] = $command;
|
||||||
$this->adjacent_annotations[$command->name] = $adjacent_annotations ?? [];
|
$this->adjacent_annotations[$command->name] = $adjacent_annotations ?? [];
|
||||||
return true;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user