Adding !dale

This commit is contained in:
Luke Robles 2021-03-04 22:01:53 -08:00
parent 0ad2e6ecaa
commit a3273d4707
3 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import random
import requests
import urllib
import get_from_reddit
@ -62,3 +63,11 @@ def random_bird_reddit():
def get_rat():
return get_from_reddit.get_image('rats')
def dale():
return "https://luker.gq/dale/" + urllib.parse.quote(
random.choice(requests.get(
'https://luker.gq/dale').json()
)['name']
)

View File

@ -214,6 +214,12 @@ async def dog(ctx):
import animals
await ctx.send(animals.get_dog())
@bot.command(name='dale')
async def dale(ctx):
import animals
await ctx.send(animals.dale())
@bot.command(name='define')
async def define(ctx):

View File

@ -41,6 +41,10 @@ def get_help_message(method):
'Pulls the latest corona virus stats per state from Johns Hopkins data',
'Usage: !corona <some US state>\neg: !corona Colorado'
],
'dale': [
'Returns a random photo of dale',
'\nUsage: !dale'
],
'decide': [
'Dragon-bot will help make the tough decisions for you',
' If there is only one option, it will give you a yes or no',
@ -134,6 +138,10 @@ def get_help_message(method):
'Returns player stats for a quake champions account\n'
'Usage: !quake <player name>'
],
'rat': [
'Returns a random rat photo',
'\nUsage: !rat'
],
'roll': [
'Rolls N number of Y sided die\n',
'Usage: !roll 3d20\n',