Last active
September 18, 2021 09:56
-
-
Save NixonXC/68df38996c06167a457ae5ef0f932b3e to your computer and use it in GitHub Desktop.
slash commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
bot = discord.Bot() | |
@bot.slash_command() | |
async def ping(ctx): | |
"""Check My Ping""" | |
await ctx.send(f"Pong! `{round(bot.latency * 1000)}ms`") | |
@bot.slash_command() | |
async def hello(ctx): | |
"""Hello!""" | |
await ctx.send(f"Hello {ctx.author.mention}!") | |
@bot.event | |
async def on_ready(): | |
print("ready") | |
bot.run("You bot's Token") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment