Skip to content

Commit

Permalink
added reply support to thanks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mole1424 committed Oct 14, 2023
1 parent 8858169 commit 4fd6708
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cogs/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ async def process_thanks(self, message: Message):
previous_message = [
message async for message in message.channel.history(limit=2)
][1]
if (
if message.reference and message.reference.message_id:
# dont thank replies to something that isnt the bot
replied_message = await message.channel.fetch_message(
message.reference.message_id
)
if replied_message.author != self.bot.user.id:
return
elif (
previous_message.author.id != self.bot.user.id
and "apollo" not in message.content.lower()
):
Expand Down

0 comments on commit 4fd6708

Please sign in to comment.