From 3a8b00295963bbfa8613160edd12dbcaff266480 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 5 Sep 2023 07:29:32 -0700 Subject: [PATCH] Adding /corgi for preston --- app/animals.py | 13 +++++++++++++ app/cogs/animal_functions.py | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/app/animals.py b/app/animals.py index f71a55e3..d757995a 100755 --- a/app/animals.py +++ b/app/animals.py @@ -5,6 +5,14 @@ import requests import get_from_reddit +def get_corgi(): + return get_from_reddit.get_image( + [ + "corgi", + ] + ) + + def get_red_panda(): red_panda = None while not red_panda: @@ -102,6 +110,11 @@ def random_dog_reddit(): "vizsla", "zoomies", "shiba", + "swedishvallhund", + "puppy101", + "lookatmydog", + "dogs", + "jackrussellterrier", ] ) diff --git a/app/cogs/animal_functions.py b/app/cogs/animal_functions.py index e7bc300a..214ee362 100755 --- a/app/cogs/animal_functions.py +++ b/app/cogs/animal_functions.py @@ -86,6 +86,12 @@ class AnimalFunctions(commands.Cog): async def rat(self, ctx: commands.Context): await ctx.respond(animals.get_rat()) + @commands.slash_command( + guild_ids=None, name="corgi", description="Posts a photo of a corgi" + ) + async def corgi(self, ctx: commands.Context): + await ctx.respond(animals.get_corgi()) + def setup(bot): bot.add_cog(AnimalFunctions(bot))