Added choose command
This commit is contained in:
parent
584117bb0d
commit
99afe042cd
@ -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 <items>...
|
||||
"""
|
||||
choice = random.choice(' '.join(args['<items>']).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).
|
||||
|
Loading…
Reference in New Issue
Block a user