Log when a command is being checked
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 3m37s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 3m37s
This commit is contained in:
parent
b6d70c0780
commit
31dd9c86ee
1 changed files with 11 additions and 11 deletions
22
src/main.py
22
src/main.py
|
@ -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"])
|
||||||
|
|
Loading…
Reference in a new issue