Значок "Поддерживает команды" в дискорд боте, используя discord.py
Сегодня увидел у ботов значки "Поддерживает команды", и захотел себе такой же. Я добавляю команды, но по-прежнему значок не выдается. Использую discord.py
import discord
from discord import app_commands
from discord.ext import commands
class PersistentViewBot(commands.Bot):
def __init__(self):
super().__init__(command_prefix='!', intents=discord.Intents.all())
async def setup_hook(self):
await bot.tree.sync(guild=discord.Object(id=guild_id))
guild_id = 123456
bot = PersistentViewBot()
# Обработчик события подключения к Discord
@bot.hybrid_command(name='embed', description="Выводит embed сообщение", with_app_command=True)
@app_commands.guilds(discord.Object(id=guild_id))
async def embed(ctx, description:str):
embed = discord.Embed(description=description,color=0x2f3136)
await ctx.channel.send(embed=embed)
bot.run()