Skip to content

Commit

Permalink
Log ignored messages to the database
Browse files Browse the repository at this point in the history
  • Loading branch information
khakers committed Nov 11, 2023
1 parent d9f8927 commit 09c9f01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,8 +1231,12 @@ async def process_commands(self, message: discord.Message):
or self.config.get("anon_reply_without_command")
or self.config.get("plain_reply_without_command")
):
# Check to see if the message starts with the ignore prefix
if not message.content.startswith(self.config.get("ignore_prefix")):
await thread.reply(message, anonymous=anonymous, plain=plain)
else:
logger.debug("Message ignored because it started with the ignore_prefix.")
await self.api.append_log(message, type_="internal")
else:
await self.api.append_log(message, type_="internal")
elif ctx.invoked_with:
Expand Down

0 comments on commit 09c9f01

Please sign in to comment.