X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-goal-bot.git/blobdiff_plain/2dfb9318625f70fd6838068d133e3dfe00000ac4..93786fa2f6de5c71bf24c8587569100f8f7cfb31:/matrix_goal_bot/bot.py diff --git a/matrix_goal_bot/bot.py b/matrix_goal_bot/bot.py index 417fca9..4bfce67 100644 --- a/matrix_goal_bot/bot.py +++ b/matrix_goal_bot/bot.py @@ -24,6 +24,7 @@ More commands: set.vision GOAL_ID VISION_ID- associate GOAL_ID with VISION_ID visions - list incomplete visions list.done - list completed goals + remove ID - remove a task by ID visionless - list goals with no set vision ''' @@ -71,13 +72,13 @@ class GoalBot(): self.bot.run() async def handle_message(self, room, message): - logger.debug(f'Message: {message}') match = botlib.MessageMatch(room, message, self.bot, self.prefix) - if not match.is_not_from_this_bot() and match.prefix(): - logger.debug(f'Message: {message} was not for this bot.') + if not match.is_not_from_this_bot(): + # Let's not talk to our-self return + logger.debug(f'Message: {message}') if not match.prefix(): logger.debug(f'{message} - did not match {self.prefix}')