From f1aa83d8f3ba3f85cd138f40566797870782a4c5 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Tue, 22 Dec 2015 18:43:54 +0100 Subject: [PATCH] keks --- plugins.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins.py b/plugins.py index e414b8f..46d7979 100644 --- a/plugins.py +++ b/plugins.py @@ -613,6 +613,18 @@ def command_cake(argv, **args): } +@pluginfunction('keks', 'keks!', ptypes_COMMAND, ratelimit_class=RATE_FUN | RATE_GLOBAL) +def command_cookie(argv, **args): + if {'please', 'bitte'}.intersection(set(argv)): + return { + 'msg': 'keks für {}: {}'.format(args['reply_user'], giphy('cookie', 'dc6zaTOxFJmzC')) + } + + return { + 'msg': args['reply_user'] + ': %s' % (random.sample(cakes, 1)[0]) + } + + @pluginfunction('plugin', "'disable' or 'enable' plugins", ptypes_COMMAND) def command_plugin_activation(argv, **args): if argv[0] != 'plugin' or len(argv) == 1: