Log failing commands
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 9s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 9s
This commit is contained in:
parent
0a302a6181
commit
777fcef499
2 changed files with 12 additions and 2 deletions
|
@ -366,14 +366,14 @@ class AutoResponder(commands.Cog):
|
||||||
extra = [attachment.url for attachment in reaction.message.attachments]
|
extra = [attachment.url for attachment in reaction.message.attachments]
|
||||||
if self.allow_on_demand_transcoding:
|
if self.allow_on_demand_transcoding:
|
||||||
await self.transcode_hevc_to_h264(reaction.message, additional=extra)
|
await self.transcode_hevc_to_h264(reaction.message, additional=extra)
|
||||||
if reaction.emoji.name == "\U0001f310":
|
if reaction.emoji == "\U0001f310":
|
||||||
if reaction.message.id not in self.lmgtfy_cache:
|
if reaction.message.id not in self.lmgtfy_cache:
|
||||||
url = "https://lmddgtfy.net/?q=" + quote_plus(reaction.message.content)
|
url = "https://lmddgtfy.net/?q=" + quote_plus(reaction.message.content)
|
||||||
m = await reaction.message.reply(f"[Here's the answer to your question]({url})")
|
m = await reaction.message.reply(f"[Here's the answer to your question]({url})")
|
||||||
await m.edit(suppress=True)
|
await m.edit(suppress=True)
|
||||||
self.lmgtfy_cache.append(reaction.message.id)
|
self.lmgtfy_cache.append(reaction.message.id)
|
||||||
|
|
||||||
if reaction.emoji.name == "\N{wastebasket}":
|
if reaction.emoji == "\N{wastebasket}":
|
||||||
if reaction.message.channel.permissions_for(reaction.message.guild.me).manage_messages:
|
if reaction.message.channel.permissions_for(reaction.message.guild.me).manage_messages:
|
||||||
await reaction.message.delete(
|
await reaction.message.delete(
|
||||||
reason="%s requested deletion of message" % user,
|
reason="%s requested deletion of message" % user,
|
||||||
|
|
10
src/main.py
10
src/main.py
|
@ -159,6 +159,16 @@ 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:
|
||||||
|
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: %r", command, d)
|
||||||
|
|
||||||
|
|
||||||
@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})")
|
||||||
|
|
Loading…
Reference in a new issue