Adding /corgi for preston

This commit is contained in:
Luke Robles 2023-09-05 07:29:32 -07:00
parent a74d7dc59f
commit 3a8b002959
2 changed files with 19 additions and 0 deletions

View File

@ -5,6 +5,14 @@ import requests
import get_from_reddit import get_from_reddit
def get_corgi():
return get_from_reddit.get_image(
[
"corgi",
]
)
def get_red_panda(): def get_red_panda():
red_panda = None red_panda = None
while not red_panda: while not red_panda:
@ -102,6 +110,11 @@ def random_dog_reddit():
"vizsla", "vizsla",
"zoomies", "zoomies",
"shiba", "shiba",
"swedishvallhund",
"puppy101",
"lookatmydog",
"dogs",
"jackrussellterrier",
] ]
) )

View File

@ -86,6 +86,12 @@ class AnimalFunctions(commands.Cog):
async def rat(self, ctx: commands.Context): async def rat(self, ctx: commands.Context):
await ctx.respond(animals.get_rat()) 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): def setup(bot):
bot.add_cog(AnimalFunctions(bot)) bot.add_cog(AnimalFunctions(bot))