diff --git a/src/cogs/auto_responder.py b/src/cogs/auto_responder.py index de1adaa..fc9aba0 100644 --- a/src/cogs/auto_responder.py +++ b/src/cogs/auto_responder.py @@ -366,14 +366,14 @@ class AutoResponder(commands.Cog): extra = [attachment.url for attachment in reaction.message.attachments] if self.allow_on_demand_transcoding: 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: url = "https://lmddgtfy.net/?q=" + quote_plus(reaction.message.content) m = await reaction.message.reply(f"[Here's the answer to your question]({url})") await m.edit(suppress=True) 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: await reaction.message.delete( reason="%s requested deletion of message" % user, diff --git a/src/main.py b/src/main.py index 45b7cfe..baa6bef 100644 --- a/src/main.py +++ b/src/main.py @@ -159,6 +159,16 @@ for module in CONFIG["jimmy"].get("modules", ["cogs/*.py"]): 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 async def on_ready(): log.info(f"Logged in as {bot.user} ({bot.user.id})")