From 7370b26a4327ee03a932884c665f628a3637d9a4 Mon Sep 17 00:00:00 2001 From: Cephra Date: Fri, 18 Aug 2017 11:31:56 +0200 Subject: [PATCH] does this make you smile? --- bot/plugins/useless.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bot/plugins/useless.py b/bot/plugins/useless.py index 0d489ab..f72de41 100644 --- a/bot/plugins/useless.py +++ b/bot/plugins/useless.py @@ -317,6 +317,21 @@ class Useless(DatabasePlugin): """ return ' '.join([self._rainbow(i, word) for i, word in enumerate(args[''])]) + @command + def asshole(self, mask: IrcString, target: IrcString, args: DocOptDict): + """Checks how much of an asshole you are. + + %%asshole [] + """ + + nick = args.get('') or mask.nick + asshole_perc = random.randint(0,100) + + if nick == 'mrhanky': + asshole_perc = 100 + + return '{} is {}% of an asshole.'.format(nick, asshole_perc) + # noinspection PyMethodMayBeStatic def _rainbow(self, i, char): return '\x03{0:02d}{1}'.format(RAINBOW[i % RAINBOW_LEN], char)