Skip to content
Snippets Groups Projects
Commit b2d9301c authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Ignore changes from the bot itself

parent 74fc24dc
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -39,12 +39,16 @@ class Karma(BotPlugin):
@re_botcmd(pattern=r'(.+)\+\+', prefixed=False, flags=re.IGNORECASE)
def on_karma_inc(self, message, match):
"""Adds karma"""
if message.frm == self.bot_identifier:
return
return self._change_karma(match.group(1), 1, message)
@re_botcmd(pattern=r'(.+)--', prefixed=False, flags=re.IGNORECASE)
def on_karma_dec(self, message, match):
"""Removes karma"""
if message.frm == self.bot_identifier:
return
return self._change_karma(match.group(1), -1, message)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment