Log when a command is being checked
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 3m37s

This commit is contained in:
Nexus 2024-05-27 17:23:51 +01:00
parent b6d70c0780
commit 31dd9c86ee

View file

@ -158,17 +158,6 @@ for module in CONFIG["jimmy"].get("modules", ["cogs/*.py"]):
log.info(f"Loaded extension {module}") log.info(f"Loaded extension {module}")
for command in bot.walk_application_commands():
try:
assert command.input_type is not None, "Input type was None!"
d = command.to_dict()
except Exception as e:
log.error("Failed to convert %r to dict", command, exc_info=e)
bot.remove_application_command(command)
else:
log.info("Loaded command %r.", command)
@bot.event @bot.event
async def on_ready(): async def on_ready():
log.info(f"Logged in as {bot.user} ({bot.user.id})") log.info(f"Logged in as {bot.user} ({bot.user.id})")
@ -287,4 +276,15 @@ if __disabled:
else: else:
log.info("No commands to disable. Full steam ahead!") log.info("No commands to disable. Full steam ahead!")
for command in bot.walk_application_commands():
log.debug("Checking %r", command)
try:
assert command.input_type is not None, "Input type was None!"
d = command.to_dict()
except Exception as e:
log.error("Failed to convert %r to dict", command, exc_info=e)
bot.remove_application_command(command)
else:
log.debug("Loaded command %r.", command)
bot.run(CONFIG["jimmy"]["token"]) bot.run(CONFIG["jimmy"]["token"])