import discord
from discord.ext import commands
client = commands.Bot(comand_prefix='bot prefix here') # You can choose your own prefix here
@client.event()
async defon_ready(): # When the bot startsprint(f"Bot online and logged in as {client.user}")
# A simple command
@client.command(aliases=["ms", "aliases!"]) # You make make the command respond to other commands too
async defping(ctx, a_variable): # a_variable is a argument you use in the command
await ctx.send(f"Pong! {round(client.latency *1000)}ms. Your input was {a_variable}")
client.run('your token here') # Running the bot
Posted by: Guest
on April-07-2021
Code answers related to "build discord bot python"
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems
resetting your password contact us
Check Your Email and Click on the link sent to your email