Skip to content

Commit

Permalink
[ReactKarma] Ignore reactions from bots
Browse files Browse the repository at this point in the history
Resolves #81.
  • Loading branch information
Tobotimus committed Feb 18, 2023
1 parent cecd828 commit 2accb26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reactkarma/reactkarma.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ async def _check_reaction(
):
message = reaction.message
(author, channel, guild) = (message.author, message.channel, message.guild)
if author == user or isinstance(channel, discord.abc.PrivateChannel):
if (
author == user
or user.bot
or isinstance(channel, discord.abc.PrivateChannel)
):
return
emoji = reaction.emoji
upvote = await self._is_upvote(guild, emoji)
Expand Down

0 comments on commit 2accb26

Please sign in to comment.