doin the thing

This commit is contained in:
Jonathan Tan 2017-08-16 17:00:43 -07:00
parent 72c33a3588
commit 970de1b55f
2 changed files with 10 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import requests
import os
import eight_ball
import excuse
import define_word
import help_methods
import discord
@ -26,7 +27,7 @@ async def on_ready():
print("\n********************************")
await client.change_presence(game=discord.Game(name='Type !help to see how to use me'))
if debug:
print("\nPress control+c to exit the bot")
print("Followed by control+d or by typing")
@ -158,10 +159,7 @@ async def on_message(message):
await client.send_message(message.channel, 'https://i.imgur.com/g6yOJjp.gif')
if message.content.startswith('!excuse'):
excuses = requests.get(
'https://gist.githubusercontent.com/AndrewBrinker/6763cdd5d79d6e3eaa3f/raw/624b946ebcca71ac76b74afa5ea41280540c1b97/excuses.txt'
).text.split("\n")
await client.send_message(message.channel, random.choice(excuses))
await client.send_message(message.channel, excuse.get_excuse())
if message.content.startswith('!purge'):
num = 20

7
app/excuse.py Normal file
View File

@ -0,0 +1,7 @@
import requests, random
def get_excuse():
excuses = requests.get(
'https://gist.githubusercontent.com/AndrewBrinker/6763cdd5d79d6e3eaa3f/raw/624b946ebcca71ac76b74afa5ea41280540c1b97/excuses.txt'
).text.split("\n")
return random.choice(excuses)