3e8d89c6 by Barry

Added rolling and some cleanup.

Added mute (shutup) for vids, images, gifs.
1 parent 468100b5
{"<@47934670406422528>": {"<@78767557628133376>": {"delivery_time": "2015/12/25 00:00:00", "message": "Merry Fucking Christmas You Asian Jew", "user_id": "47934670406422528", "channel": "47934985176354816"}}, "<@48148712194576384>": {"<@121404665727418368>": {"delivery_time": "2019/02/03 02:38:24", "message": "u gay", "user_id": "48148712194576384", "channel": "47934985176354816"}}, "<@49237234515181568>": {"<@47934670406422528>": {"delivery_time": "2047/08/11 18:39:12", "message": "ur a fgt", "user_id": "49237234515181568", "channel": "47934985176354816"}}, "<@78767557628133376>": {"<@78767557628133376>": {"delivery_time": "2015/12/22 00:00:00", "message": "happy birthday eli", "user_id": "78767557628133376", "channel": "121370073465094146"}}, "<@121404665727418368>": {"<@47934670406422528>": {"delivery_time": "2016/12/02 16:54:33", "message": "I'm gay.", "user_id": "121404665727418368", "channel": "47934985176354816"}}, "<@63649222993391616>": {"<@121404665727418368>": {"delivery_time": "2015/12/10 16:57:52", "message": "fuck off spic", "user_id": "63649222993391616", "channel": "47934985176354816"}}}
\ No newline at end of file
{"<@49237234515181568>": {"<@47934670406422528>": {"delivery_time": "2047/08/11 18:39:12", "message": "ur a fgt", "user_id": "49237234515181568", "channel": "47934985176354816"}}, "<@121404665727418368>": {"<@47934670406422528>": {"delivery_time": "2016/12/02 16:54:33", "message": "I'm gay.", "user_id": "121404665727418368", "channel": "47934985176354816"}}, "<@63649222993391616>": {"<@121404665727418368>": {"delivery_time": "2015/12/10 16:57:52", "message": "fuck off spic", "user_id": "63649222993391616", "channel": "47934985176354816"}}, "<@48148712194576384>": {"<@121404665727418368>": {"delivery_time": "2019/02/03 02:38:24", "message": "u gay", "user_id": "48148712194576384", "channel": "47934985176354816"}}, "<@78767557628133376>": {"<@78767557628133376>": {"delivery_time": "2015/12/22 00:00:00", "message": "happy birthday eli", "user_id": "78767557628133376", "channel": "121370073465094146"}}}
\ No newline at end of file
......
["あなたのガールフレンドは、あなたの後ろの大きな黒い男とセックスを持っているし、それは非常に楽しんでいます。あなたは3年後、彼女はあなたが仕事であったが、それは毎日起こっている明らかにし、その時点でアウトになるまで見つけることができません。あなたはそこに彼女のためにされていないことをお詫びし、あなたと結婚するために彼女をお願いします。 wwwwwww", "Your future is looking grim, consider purchasing Fallout 4™", "あなたのガールフレンドは、あなたの後ろの大きな黒い男とセックスを持っているし、それは非常に楽しんでいます。あなたは3年後、彼女はあなたが仕事であったが、それは毎日起こっている明らかにし、その時点でアウトになるまで見つけることができません。あなたはそこに彼女のためにされていないことをお詫びし、あなたと結婚するために彼女をお願いします。 wwwwwww", "You are being cucked as you are reading this.", "In a world of immigration, censorship and equality... You are being cucked.", "Bright future, white future.", "Fortune Not Found: Abort, Retry, Ignore?", "Now would be a good time to get cucked.", "Come back later... I am sleeping.", "http://cdn.memegenerator.net/instances/400x/12009294.jpg", "Your Allagan Cane will drop next run.", "Your Allagan Cane will never drop.", "http://puu.sh/lFYCG/7f0cfb0004.jpg", "You could not be less interesting, but you are going to keep trying -- right?", "Xorfos will get his Dreadwyrm Axe someday.", "Reminder that Rui never beat Turn 13.", "Fallout 4 will win TGA 2015", "You will get a big fat futa cock up your ass soon.", "Your current problems will only get worse.", "Your cuck shed will see lots of activity in the near future.", "To do great things is difficult; but for you, it is impossible.", "When people tell you that you can't do something, they are probably right.", "There are now 23 nicknames going around for you; None of them are flattering. Tonight you're getting another one.", "Undertale will win TGA 2015", "You are going to develop http://puu.sh/lGFdS/71d497e8e8.gif", "You will go blind and your penis will shrivel by next week, but all can be prevented by inviting your friends & family to use Discord!", "Fortune smiles upon you! Goshzilla will be receiving his BBC into his ass shortly -- AND YOU GOT FRONT ROW SEAT.", "Miss Fortune demands that you play this http://store.steampowered.com/app/418010/", "Everything will be fire.", "Good bombings and many refugees will come to you but only if you post \"HILLARY 2016\" in this chat.", "You will marry 3dpd and have many ugly children. http://i.imgur.com/uNSz7B7.jpg"]
\ No newline at end of file
["あなたのガールフレンドは、あなたの後ろの大きな黒い男とセックスを持っているし、それは非常に楽しんでいます。あなたは3年後、彼女はあなたが仕事であったが、それは毎日起こっている明らかにし、その時点でアウトになるまで見つけることができません。あなたはそこに彼女のためにされていないことをお詫びし、あなたと結婚するために彼女をお願いします。 wwwwwww", "Your future is looking grim, consider purchasing Fallout 4™", "あなたのガールフレンドは、あなたの後ろの大きな黒い男とセックスを持っているし、それは非常に楽しんでいます。あなたは3年後、彼女はあなたが仕事であったが、それは毎日起こっている明らかにし、その時点でアウトになるまで見つけることができません。あなたはそこに彼女のためにされていないことをお詫びし、あなたと結婚するために彼女をお願いします。 wwwwwww", "You are being cucked as you are reading this.", "In a world of immigration, censorship and equality... You are being cucked.", "Bright future, white future.", "Fortune Not Found: Abort, Retry, Ignore?", "Now would be a good time to get cucked.", "Come back later... I am sleeping.", "http://cdn.memegenerator.net/instances/400x/12009294.jpg", "Your Allagan Cane will drop next run.", "Your Allagan Cane will never drop.", "http://puu.sh/lFYCG/7f0cfb0004.jpg", "You could not be less interesting, but you are going to keep trying -- right?", "Xorfos will get his Dreadwyrm Axe someday.", "Reminder that Rui never beat Turn 13.", "Fallout 4 will win TGA 2015", "You will get a big fat futa cock up your ass soon.", "Your current problems will only get worse.", "Your cuck shed will see lots of activity in the near future.", "To do great things is difficult; but for you, it is impossible.", "When people tell you that you can't do something, they are probably right.", "There are now 23 nicknames going around for you; None of them are flattering. Tonight you're getting another one.", "Undertale will win TGA 2015", "You are going to develop http://puu.sh/lGFdS/71d497e8e8.gif", "You will go blind and your penis will shrivel by next week, but all can be prevented by inviting your friends & family to use Discord!", "Fortune smiles upon you! Goshzilla will be receiving his BBC into his ass shortly -- AND YOU GOT FRONT ROW SEAT.", "Miss Fortune demands that you play this http://store.steampowered.com/app/418010/", "Everything will be fire.", "Good bombings and many refugees will come to you but only if you post \"HILLARY 2016\" in this chat.", "You will marry 3dpd and have many ugly children. http://i.imgur.com/uNSz7B7.jpg", "I foresee fapping in your near future! http://puu.sh/lHdZn/aa737a5846.jpg", "I foresee fapping in your near future! http://puu.sh/lHdZn/aa737a5846.jpg"]
\ No newline at end of file
......
......@@ -17,6 +17,8 @@ fortune_file = 'fortunes.json'
games_file = 'games.json'
credentials = 'creds.json'
muted_until = datetime.datetime.now()
client = discord.Client()
json_data=open(credentials).read()
......@@ -204,6 +206,7 @@ def on_message(message):
print message.content
print message.author
print client.user
global muted_until
# we do not want the bot to reply to itself
if message.author == client.user:
return
......@@ -219,22 +222,30 @@ def on_message(message):
client.send_message(message.channel,
"""{} Available Commands:
You can ask compound or questions and I will choose. Example: HellsBot Rui is a Faggot or Rui is a faggot?
User Info:
!aliases - Returns a list of all aliases a user has set for themselves.
!addalias <alias> - Adds an alias to your list of aliases.
!lastseen <username> - Returns info on when the user was last seen and their status.
Messages:
!msg <username> in 5 minutes Tea is ready
!msg <username> in 45 seconds Your finished masterbating
!msg <username> in 2 hours The movie is over
!msg <username> on 12/22/2015 Happy Birthday!
Games:
!games <username> - Returns a list of games played for a username.
!gameslist - Returns a list of the top 20 games and the number of people who have played that game.
!whoplayed <gamename> - Returns a list of players who have played the game.
!lastseen <username> - Returns info on when the user was last seen and their status.
!addfortune <fortune> - Adds a new fortune.
!fortune - Returns your fortune.
Spam:
!youtube <search term> - Returns the first video from the search results for the search term.
!gif <search term> - Returns the first gif from the search results.
!image <search term> - Returns the first image from the search results.
Stuff:
!addfortune <fortune> - Adds a new fortune.
!fortune - Returns your fortune.
!roll <1d20> - Roll X number of dice of size X. 1d20 returns 1 roll 1-20. 3d6 returns 3 rolls of 1-6 etc...
!secret
!shutup - disables all image / gif / youtube span for 5 minutes
!bemyirlwaifu""".format(message.author.mention()))
return
......@@ -266,21 +277,57 @@ You can ask compound or questions and I will choose. Example: HellsBot Rui is a
else:
client.send_message(message.channel, 'I don\'t have any data on {} yet {}'.format(username, message.author.mention()))
if message.content.startswith('!shutup'):
muted_until = datetime.datetime.now() + datetime.timedelta(minutes=5)
client.send_message(message.channel, search_youtube(query))
return
if message.content.startswith('!youtube'):
if datetime.datetime.now() < muted_until:
return
query = message.content[9:]
client.send_message(message.channel, search_youtube(query))
return
if message.content.startswith('!image'):
if datetime.datetime.now() < muted_until:
return
query = message.content[7:]
client.send_message(message.channel, search_google_images(query))
return
if message.content.startswith('!gif'):
if datetime.datetime.now() < muted_until:
return
query = message.content[7:]
client.send_message(message.channel, search_google_images(query, True))
return
if message.content.startswith('!roll'):
request = message.content[6:]
count = 1
dice = 100
if request.strip() != '':
if 'd' in request:
dice_parts = request.split('d')
if len(dice_parts) == 2:
if dice_parts[0].isdigit() and dice_parts[1].isdigit():
count = int(dice_parts[0])
dice = int(dice_parts[1])
if count > 100000000000000000:
client.send_message(message.channel, '{} stop fucking around with those stupid numbers...'.format(message.author.mention()))
return
if count > 100:
client.send_message(message.channel, '{} 100 is the largest number of dice I will roll.'.format(message.author.mention()))
return
roll_results = []
for i in range(count):
roll_results.append(random.randint(1,dice))
out_string = '{} your roll {}d{}: {} = {}'.format(message.author.mention(), count, dice, '+'.join(str(r) for r in roll_results), sum(roll_results))
client.send_message(message.channel, out_string)
return
if message.content.startswith('!gameslist'):
data = None
try:
......