Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python nextcord bot slash command

import nextcord
from nextcord.ext import commands

client = commands.Bot()

#runs when bot is logged in
@client.event
async def on_ready():
    print("bot is ready")

@client.slash_command()
async def ping(interaction: nextcord.Interaction)
	interaction.send("Pong!")

client.run("put bots token from developer portal here")
 
PREVIOUS NEXT
Tagged: #python #nextcord #bot #slash #command
ADD COMMENT
Topic
Name
2+2 =