Skip to content

Commit

Permalink
Format foods.py. This fixes the file erroring on load, introduced by …
Browse files Browse the repository at this point in the history
…my merging of the biscuit command.
  • Loading branch information
daboross authored and Michael Doo committed Jul 26, 2016
1 parent 2644b0d commit 6af90f3
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions plugins/foods.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import codecs
import asyncio
import json

import codecs
import os
import random
import asyncio
import re

from cloudbot import hook
Expand All @@ -16,11 +17,12 @@
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']

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']

# <Luke> Hey guys, any good ideas for plugins?
# <User> I don't know, something that lists every potato known to man?
Expand Down Expand Up @@ -65,6 +67,7 @@ def is_valid(target):
else:
return False


@hook.on_start()
def load_foods(bot):
"""
Expand Down Expand Up @@ -135,17 +138,16 @@ 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):
"""<user> - gives <user> a biscuit"""
user = text.strip()

name = random.choice(['bickie', 'biscuit'])
flavor = random.choice(['tasty', 'delectable', 'delicious', 'yummy', 'gorgeous', 'scrumptious', 'luscious', 'irresistible', 'mouth watering'])

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)

Expand All @@ -170,6 +172,7 @@ def sandwich(text, action):
# act out the message
action(generator.generate_string())


@asyncio.coroutine
@hook.command
def taco(text, action):
Expand Down

0 comments on commit 6af90f3

Please sign in to comment.