perf: remove error raise when command handler return an unexpected value

This commit is contained in:
Soulter
2024-09-17 04:49:49 -04:00
parent 7e9f54ed2c
commit 4ecd78d6a8
+5 -2
View File
@@ -124,8 +124,11 @@ class CommandManager():
else:
command_result = handler(message_event, context)
if not isinstance(command_result, CommandResult):
raise ValueError(f"Command {command} handler should return CommandResult.")
# if not isinstance(command_result, CommandResult):
# raise ValueError(f"Command {command} handler should return CommandResult.")
if not command_result:
return
context.metrics_uploader.command_stats[command] += 1