From b680f3f0c870c11aa236a99f2de08d4fb0b57c9a Mon Sep 17 00:00:00 2001 From: Cory Redmond Date: Tue, 14 Jul 2015 13:13:28 +0100 Subject: [PATCH] Bring on the biscuits! --- plugins/foods.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/plugins/foods.py b/plugins/foods.py index 71171a28f..5dd155238 100644 --- a/plugins/foods.py +++ b/plugins/foods.py @@ -16,6 +16,11 @@ cookies = ['Chocolate Chip', 'Oatmeal', 'Sugar', 'Oatmeal Raisin', 'Macadamia Nut', 'Jam Thumbprint', 'Medican Wedding', 'Biscotti', 'Oatmeal Cranberry', 'Chocolate Fudge', 'Peanut Butter', 'Pumpkin', 'Lemon Bar', 'Chocolate Oatmeal Fudge', 'Toffee Peanut', 'Danish Sugar', 'Triple Chocolate', 'Oreo'] + +biscuits = ['Digestive', 'Chocolate Digestive', 'Caramel Digestive', 'Hobnob', 'Chocolate Hobnob', 'Rich Tea Finger', 'Rich Tea', + 'Custard Cream', 'Chocolate Finger', 'Ginger Nut', 'Penguin Bar', 'Fruit Shortcake', 'Caramel Wafer', 'Shortbread Round', + 'Lemon Puff', 'Elite Chocolate Tea Cake', 'Club Bar', 'Garbaldi', 'Viennese', 'Bourbon Cream', 'Malted Milk', 'Lotus Biscoff', + 'Nice', 'Fig Roll', 'Jammie Dodger', 'Oatie', 'Jaffa Cake'] # Hey guys, any good ideas for plugins? # I don't know, something that lists every potato known to man? @@ -130,6 +135,24 @@ def cookie(text, action): action("{} {} a {} {} {} cookie and serves it with a {}!".format(method, user, flavor, size, cookie_type, side_dish)) + + +@asyncio.coroutine +@hook.command +def biscuit(text, action): + """ - gives a biscuit""" + user = text.strip() + + name = random.choice(['bickie', 'biscuit']) + flavor = random.choice(['tasty', 'delectable', 'delicious', 'yummy', 'gorgeous', 'scrumptious', 'luscious', 'irresistible', 'mouth watering']) + + if not is_valid(user): + return "I can't give a {} {} to that user.".format(flavor, name) + + bickie_type = random.choice(biscuits) + method = random.choice(['makes', 'gives', 'gets', 'buys', 'unwillingly passes', 'grants']) + + action("{} {} a {} {} {}!".format(method, user, flavor, size, bickie_type, name)) @asyncio.coroutine