diff --git a/app/animals.py b/app/animals.py index f15386f6..36a5e88c 100644 --- a/app/animals.py +++ b/app/animals.py @@ -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'] + ) \ No newline at end of file diff --git a/app/bot.py b/app/bot.py index 653ff4b6..d040699f 100755 --- a/app/bot.py +++ b/app/bot.py @@ -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): diff --git a/app/help_methods.py b/app/help_methods.py index 7749bb1a..04363046 100644 --- a/app/help_methods.py +++ b/app/help_methods.py @@ -41,6 +41,10 @@ def get_help_message(method): 'Pulls the latest corona virus stats per state from Johns Hopkins data', 'Usage: !corona \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 ' ], + 'rat': [ + 'Returns a random rat photo', + '\nUsage: !rat' + ], 'roll': [ 'Rolls N number of Y sided die\n', 'Usage: !roll 3d20\n',