diff --git a/nxy/plugins/useless.py b/nxy/plugins/useless.py index 4d83839..f92e5ff 100644 --- a/nxy/plugins/useless.py +++ b/nxy/plugins/useless.py @@ -55,6 +55,16 @@ class Useless(Plugin): for face in (':O C==3', ':OC==3', ':C==3', ':C=3', ':C3', ':3'): self.bot.privmsg(channel, face) + @command + def choose(self, mask: IrcString, channel: IrcString, args: DocOptDict): + """Decides between items separated by comma. + + %%choose ... + """ + choice = random.choice(' '.join(args['']).split(',')) + return '{nick}, I\'d choose: {choice}'.format(nick=mask.nick, + choice=choice.strip()) + @command def jn(self, mask: IrcString, channel: IrcString, args: DocOptDict): """Decides between yes and no (for a question).