Код: Выделить всё
search_command = discord.app_commands.Group(name="searchpic", description="Returns an image.")
tree.add_command(search_command)
@search_command.command(name="cat", description="Returns an image of a cat.")
async def search_command_cat(interaction: discord.Interaction):
gis.search(search_params=_cat_search_params)
for image in gis.results():
empty_embed.set_image(url=f'{image.url}')
await interaction.channel.send(embed=empty_embed)
Подробнее здесь: https://stackoverflow.com/questions/785 ... nt-command