Only check commands with options
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s

This commit is contained in:
Nexus 2024-05-27 17:44:29 +01:00
parent 98a73d534f
commit 7291bc6181

View file

@ -122,9 +122,10 @@ class Client(commands.Bot):
for command in cmds: for command in cmds:
log.debug("Checking %r", command) log.debug("Checking %r", command)
try: try:
for option in command.options: if hasattr(command, "options"):
if option.input_type is None: for option in command.options:
raise TypeError("Input type is None") if option.input_type is None:
raise TypeError("Input type is None")
_ = command.to_dict() _ = command.to_dict()
except Exception as e: except Exception as e:
log.error("Failed to validate %r", command, exc_info=e) log.error("Failed to validate %r", command, exc_info=e)