last code from server

This commit is contained in:
Alex D
2023-04-25 04:47:00 +03:00
parent cb8fb7d359
commit 5cca85686e
12 changed files with 31 additions and 24 deletions
+2 -2
View File
@@ -7,11 +7,11 @@ class DogCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.slash_command(name="dog")
@commands.slash_command(name="собака", description="Показывает фото случайной собаки")
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 = disnake.Embed(title='Случайная собака', color=0x00f8fe)
embed.set_image(url=img_url)
await ctx.send(embed=embed)