Skip to content

Commit 79f4e47

Browse files
fix: added a additional check for saftey
1 parent 0a4afc9 commit 79f4e47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tux/cogs/services/bookmarks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent) ->
7777
if not isinstance(channel, discord.DMChannel):
7878
return
7979

80-
# If the emoji is the remove bookmark emoji, remove the bookmark
81-
if payload.emoji.name in self.remove_bookmark_emojis:
80+
# If the emoji is the remove bookmark emoji and reaction is on the bot, remove the bookmark
81+
if payload.emoji.name in self.remove_bookmark_emojis and message.author is self.bot.user:
8282
await self.remove_bookmark(message)
8383

8484
async def add_bookmark(self, user: discord.User, message: discord.Message) -> None:

0 commit comments

Comments
 (0)