add trigger

This commit is contained in:
Adam Piontek 2019-08-27 12:26:37 -04:00
parent 6372d9c91c
commit bc94c7899d

View file

@ -205,7 +205,13 @@ class MyHero(BotPlugin):
"""Generates a special hunky hero name for you""" """Generates a special hunky hero name for you"""
return self.get_hero_name() return self.get_hero_name()
@re_botcmd(pattern=r"space mutiny|hero", prefixed=False, flags=re.IGNORECASE) # @re_botcmd(pattern=r"(^| )hero($| |\.)|(^| )heros($| |\.)|(^| )heroes($| |\.)", prefixed=False, flags=re.IGNORECASE)
@re_botcmd(pattern=r"(^| )(hero|heros|heroes)($| |\.|\!|\?)", prefixed=False, flags=re.IGNORECASE)
def listen_for_talk_of_heroes(self, msg, match): def listen_for_talk_of_heroes(self, msg, match):
"""Talk of heroes prompts a Space Hero Name...""" """Talk of heroes prompts a Space Hero Name..."""
return self.get_hero_name() return self.get_hero_name()
@re_botcmd(pattern=r"space mutiny", prefixed=False, flags=re.IGNORECASE)
def listen_for_talk_of_mutiny(self, msg, match):
"""Talk of mutiny prompts a Space Hero Name..."""
return self.get_hero_name()