From a53f019fe7d46b21f793eef0dfee8d08fabec523 Mon Sep 17 00:00:00 2001 From: Jackie Friedberg <148140471+Pho3nix-Jacki3@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:55:45 -0500 Subject: [PATCH 1/2] Update veteran.py Update cat api link to https://api.thecatapi.com/v1/images/search?format=json from https://thecatapi.com/ --- JHDBot/cogs/veteran.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JHDBot/cogs/veteran.py b/JHDBot/cogs/veteran.py index 0d515d0..7f77529 100644 --- a/JHDBot/cogs/veteran.py +++ b/JHDBot/cogs/veteran.py @@ -84,7 +84,7 @@ async def not_your_personal_avengers(self, ctx): async def cat(self, ctx): if await self.check_perms(ctx): async with aiohttp.ClientSession() as session: - async with session.get('https://api.thecatapi.com/api/images/get?format=json') as response: + async with session.get('https://api.thecatapi.com/v1/images/search?format=json') as response: html = json.loads(await response.text()) emb = discord.Embed(description=f'Kato <3', colour=0x3CFF4C) emb.set_footer(text=f"Cute isn't it/kawaii da ne?") From 0415cf0b94c7257f600728bfdb2bde68b083d2fe Mon Sep 17 00:00:00 2001 From: Jackie Friedberg <148140471+Pho3nix-Jacki3@users.noreply.github.com> Date: Sat, 30 Mar 2024 19:16:03 -0500 Subject: [PATCH 2/2] Add $dog command --- JHDBot/cogs/veteran.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/JHDBot/cogs/veteran.py b/JHDBot/cogs/veteran.py index 7f77529..8b31cf4 100644 --- a/JHDBot/cogs/veteran.py +++ b/JHDBot/cogs/veteran.py @@ -79,7 +79,7 @@ async def not_your_personal_avengers(self, ctx): # Cat command - to embed wholesomeness in chat @commands.command( name="cat", - help="Command to add wholesomeness to chat." + help="Command to add wholesomeness to chat...or change the subject" ) async def cat(self, ctx): if await self.check_perms(ctx): @@ -93,6 +93,23 @@ async def cat(self, ctx): else: return + # Dog command - to embed more wholesomeness in chat + @commands.command( + name="dog", + help="Another command to add wholesomeness to chat...or change the subject." + ) + async def dog(self, ctx): + if await self.check_perms(ctx): + async with aiohttp.ClientSession() as session: + async with session.get('https://api.thedogapi.com/v1/images/search?format=json') as response: + html = json.loads(await response.text()) + emb = discord.Embed(description=f'Inu <3', colour=0x3CFF4C) + emb.set_footer(text=f"Cute isn't it/kawaii da ne?") + emb.set_image(url=(html[0]["url"])) + await ctx.send(embed=emb) + else: + return + # blackhat command @commands.command( name="blackhat",