Skip to content

Commit 0415cf0

Browse files
authored
Add $dog command
1 parent a53f019 commit 0415cf0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

JHDBot/cogs/veteran.py

+18-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async def not_your_personal_avengers(self, ctx):
7979
# Cat command - to embed wholesomeness in chat
8080
@commands.command(
8181
name="cat",
82-
help="Command to add wholesomeness to chat."
82+
help="Command to add wholesomeness to chat...or change the subject"
8383
)
8484
async def cat(self, ctx):
8585
if await self.check_perms(ctx):
@@ -93,6 +93,23 @@ async def cat(self, ctx):
9393
else:
9494
return
9595

96+
# Dog command - to embed more wholesomeness in chat
97+
@commands.command(
98+
name="dog",
99+
help="Another command to add wholesomeness to chat...or change the subject."
100+
)
101+
async def dog(self, ctx):
102+
if await self.check_perms(ctx):
103+
async with aiohttp.ClientSession() as session:
104+
async with session.get('https://api.thedogapi.com/v1/images/search?format=json') as response:
105+
html = json.loads(await response.text())
106+
emb = discord.Embed(description=f'Inu <3', colour=0x3CFF4C)
107+
emb.set_footer(text=f"Cute isn't it/kawaii da ne?")
108+
emb.set_image(url=(html[0]["url"]))
109+
await ctx.send(embed=emb)
110+
else:
111+
return
112+
96113
# blackhat command
97114
@commands.command(
98115
name="blackhat",

0 commit comments

Comments
 (0)