forked from sopel-irc/sopel-extras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
8ball.py
17 lines (14 loc) · 786 Bytes
/
8ball.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
8ball.py - Ask the magic 8ball a question
Copyright 2013, Sander Brand http://brantje.com
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) - 1)
bot.say(messages[answer]);