Actually check commands
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s
This commit is contained in:
parent
0da4ec5d63
commit
98a73d534f
1 changed files with 4 additions and 2 deletions
|
@ -122,10 +122,12 @@ class Client(commands.Bot):
|
|||
for command in cmds:
|
||||
log.debug("Checking %r", command)
|
||||
try:
|
||||
assert command.input_type is not None, "Input type was None!"
|
||||
for option in command.options:
|
||||
if option.input_type is None:
|
||||
raise TypeError("Input type is None")
|
||||
_ = command.to_dict()
|
||||
except Exception as e:
|
||||
log.error("Failed to convert %r to dict", command, exc_info=e)
|
||||
log.error("Failed to validate %r", command, exc_info=e)
|
||||
self.remove_application_command(command)
|
||||
else:
|
||||
log.debug("Loaded command %r.", command)
|
||||
|
|
Loading…
Reference in a new issue