python slash commands

Solutions on MaxInterview for python slash commands by the best coders in the world

showing results for - "python slash commands"
Gabrielle
01 Jan 2017
1import discord
2from discord.ext import commands
3from discord_slash import SlashCommand, SlashContext
4
5bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())
6slash = SlashCommand(bot)
7
8@slash.slash(name="test")
9async def _test(ctx: SlashContext):
10    embed = discord.Embed(title="embed test")
11    await ctx.send(content="test", embeds=[embed])
12
13bot.run("discord_token")
14#SOURCE: https://pypi.org/project/discord-py-slash-command/