@RED2190

Как сделать slash commands в DISCORD.py?

Всем привет. Почему то не работают slash команды в боте. Запускается исправно. Надеюсь на вашу помощь, заранее спасибо)

код:

@slash.slash(name="test")
async def test(ctx: SlashContext):
    await ctx.send("Привет")


62502df65977d626190591.png

Библиотеки:

import discord
from discord.ext import commands
from discord_components import DiscordComponents, Button, ButtonStyle
from discord.ext import commands, tasks
from discord_components import *
from discord_buttons_plugin import  *
from discord.ext.commands import Bot
from discord import member
from discord.utils import get
from discord_slash import SlashCommand, SlashContext


intents = discord.Intents.all()
from discord.ext import commands, tasks
  • Вопрос задан
  • 2766 просмотров
Пригласить эксперта
Ответы на вопрос 2
Vindicar
@Vindicar
RTFM!
@AmbushMacroZ
Пример:
@bot.tree.command(name="test", description="You can say?")
async def cmd(interaction):
    await interaction.channel.send('Привет')
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы