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