1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00
This commit is contained in:
Thorsten
2016-01-03 18:56:20 +01:00
parent d87ccb3777
commit f1712d8920

View File

@@ -176,9 +176,9 @@ def command_dice(argv, **args):
@pluginfunction('choose', 'chooses randomly between arguments', ptypes_COMMAND, ratelimit_class=RATE_INTERACTIVE)
def command_choose(argv, **args):
alternatives = argv
if 2 > len(alternatives):
if not alternatives:
return {
'msg': '%s: choosing between one or less things is pointless' % args['reply_user']
'msg': '{}: {}.'.format(args['reply_user'], random.choice(['Yes', 'No']))
}
choice = random.choice(alternatives)