check pending instead
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 5s

This commit is contained in:
Nexus 2024-05-27 17:39:22 +01:00
parent bbcbbd12e0
commit 0da4ec5d63

View file

@ -113,8 +113,13 @@ class Client(commands.Bot):
self.uptime_thread = None self.uptime_thread = None
async def on_connect(self): async def on_connect(self):
log.debug("Walking the following application commands: %r", list(self.walk_application_commands())) if not any(self.walk_application_commands()):
for command in self.walk_application_commands(): log.warning("No application commands. using pending.")
cmds = self.pending_application_commands
else:
cmds = list(self.walk_application_commands())
log.debug("Walking the following application commands: %r", cmds)
for command in cmds:
log.debug("Checking %r", command) log.debug("Checking %r", command)
try: try:
assert command.input_type is not None, "Input type was None!" assert command.input_type is not None, "Input type was None!"