Answer the question
In order to leave comments, you need to log in
Discord.py | How to do this?
How to implement slash command highlighting through the Discord.py library Screenshot of
what exactly I want:
Answer the question
In order to leave comments, you need to log in
bibles:
pip install discord
pip install discord_slash
pip install discord-py-slash-command
import discord
from discord_slash import SlashCommand # Импортируем новую библиотеку
client = discord.Client(intents=discord.Intents.all())
slash = SlashCommand(client, auto_register=True) # Объявляем слэш команды через клиент
@client.event
async def on_ready():
print("Готов!")
@slash.slash(name="ping",
description="Возращает скорость ответа бота",
)
async def _ping(ctx): # Объявляем новую команду
await ctx.send(content=f"Pong! ({client.latency*1000}ms)")
client.run("ТОКЕН")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question