fix:exclude disabled commands from platform command registration (#4485)

This commit is contained in:
時壹
2026-01-15 15:04:15 +09:00
committed by GitHub
parent 0e3d224c12
commit 9782d1bff8
2 changed files with 4 additions and 0 deletions
@@ -370,6 +370,8 @@ class DiscordPlatformAdapter(Platform):
for handler_md in star_handlers_registry:
if not star_map[handler_md.handler_module_path].activated:
continue
if not handler_md.enabled:
continue
for event_filter in handler_md.event_filters:
cmd_info = self._extract_command_info(event_filter, handler_md)
if not cmd_info:
@@ -161,6 +161,8 @@ class TelegramPlatformAdapter(Platform):
handler_metadata = handler_md
if not star_map[handler_metadata.handler_module_path].activated:
continue
if not handler_metadata.enabled:
continue
for event_filter in handler_metadata.event_filters:
cmd_info = self._extract_command_info(
event_filter,