-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2brewritin.py
53 lines (42 loc) · 1.26 KB
/
2brewritin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'''
import os
import discord
from discord.ext import commands
from discord.utils import get
import random
import requests
import json
import responses
client = discord.Client()
cmd = ('&')
def get_yo_momma():
response = requests.get('https://api.yomomma.info/')
json_data = json.loads(response.text)
joke = json_data['joke']
return joke
@client.event
async def on_ready():
print('*yawn* ok ok fine im awake jeez')
print('i am {0.user}'.format(client) + ' and its time for uh stuff')
@client.event
async def on_message(message):
if message.author == client.user:
return
msg = message.content
if msg.startswith(cmd + 'hi'):
response = random.choice(responses.hi)
await message.channel.send(response)
if msg.startswith(cmd + 'yo momma'):
response = get_yo_momma()
await message.channel.send(response)
if msg.startswith(cmd + 'good bot'):
response = random.choice(responses.thanks) + (' :]')
await message.channel.send(response)
if msg.startswith(cmd + 'bad bot'):
response = random.choice(responses.sad_ok) + (' :[')
await message.channel.send(response)
if msg.startswith(cmd + 'eat my ass'):
await message.channel.send('i will gladly eat your ass dm me')
my_secret = os.environ['secret']
client.run(my_secret)
'''