mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 16:15:34 +08:00
fix generate command list events not exists
This commit is contained in:
@@ -134,12 +134,7 @@ class CommandInfoUtil
|
||||
{
|
||||
$commands = [];
|
||||
|
||||
foreach (EventManager::$events[CQCommand::class] as $annotation) {
|
||||
// 正常来说不可能,但保险起见需要判断
|
||||
if (!$annotation instanceof CQCommand) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (EventManager::$events[CQCommand::class] ?? [] as $annotation) {
|
||||
$id = "{$annotation->class}@{$annotation->method}";
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user