R
R
RED21902022-04-08 15:44:04
Python
RED2190, 2022-04-08 15:44:04

How to make slash commands in DISCORD.py?

Hello. For some reason, slash commands do not work in the bot. Runs properly. I hope for your help, thanks in advance)

code:

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


62502df65977d626190591.png

Libraries:

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

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2022-04-08
@Vindicar

Did you get an example from the documentation ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question