This commit is contained in:
Alex D
2023-04-24 17:45:20 +03:00
parent 56c1ebefd3
commit 4731006753
18 changed files with 371 additions and 94 deletions
+20
View File
@@ -0,0 +1,20 @@
import disnake
import requests
from disnake.ext import commands
class DogCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.slash_command()
async def dog(self, ctx: disnake.AppCommandInteraction):
response = requests.get('https://dog.ceo/api/breeds/image/random')
img_url = response.json()['message']
embed = disnake.Embed(title='Случайная собака', color=0x00ff00)
embed.set_image(url=img_url)
await ctx.send(embed=embed)
def setup(bot):
bot.add_cog(DogCommands(bot))