Skip to content

Commit

Permalink
Guild_Log: Return if announcement message is a reply
Browse files Browse the repository at this point in the history
Fixes `discord.errors.HTTPException: 400 Bad Request (error code: 50068): Invalid message type`
  • Loading branch information
murpii authored Jan 19, 2024
1 parent 2d1c80f commit f5049b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cogs/guild_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ async def on_message_edit(self, before: discord.Message, after: discord.Message)

@commands.Cog.listener()
async def on_message(self, message: discord.Message):
# Can't publish message replies
if message.reference:
return

if message.channel.id in (CHAN_ANNOUNCEMENTS, CHAN_MAP_RELEASES):
await message.publish()

Expand Down

0 comments on commit f5049b8

Please sign in to comment.