Created
September 6, 2013 11:44
-
-
Save brantje/6462726 to your computer and use it in GitHub Desktop.
Magic 8Ball for willie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
forum.py - Show a link to the xbian forum | |
Copyright 2013, Edward Powell - embolalia.net | |
Licensed under the Eiffel Forum License 2. | |
http://willie.dfbta.net | |
""" | |
import willie | |
import random | |
@willie.module.commands('8') | |
def ball(bot, trigger): | |
"""Ask the magic 8ball a question! Usage: !8 <question>""" | |
messages = ["It is certain"," It is decidedly so","Without a doubt","Yes definitely","You may rely on it","As I see it yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","God says no","Very doubtful","Outlook not so good"] | |
answer = random.randint(0,len(messages)) | |
bot.say(messages[answer]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment