useless: fix syntax warning

storage: shorten code
This commit is contained in:
2020-03-16 22:04:29 +00:00
parent e03f5d0a43
commit 80cfa2f815
2 changed files with 5 additions and 7 deletions

View File

@ -114,7 +114,7 @@ class Useless(DatabasePlugin):
@irc3.event(r'(?i)^:\S+ PRIVMSG (?P<target>\S+) :.*(woah|whoa).*$')
def woah(self, target: str):
"""Colorize words in a sentence with rainbow colors."""
if random.randint(0, 4) is 0:
if random.randint(0, 4) == 0:
self.bot.privmsg(target, random.choice(self.WOAH))
@irc3.event(r'(?i)^:\S+ PRIVMSG (?P<target>\S+) :(?P<msg>huehuehue)$')