import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="!", description="The description")
@bot.event
async defon_ready():
print("Ready !")
@bot.command()
async defping(ctx):
await ctx.send('**pong**')
bot.run("enter the token here between the quotes")
Posted by: Guest
on January-02-2021
1
Discord.py bot example
#Anything commented out is optionalimport discord
from discord.ext import commands
bot = commands.Bot(command_prefix='prefix here')
@bot.event
async defon_ready():
# await bot.change_presence(activity=discord.Game(name="Rich Presence Here"))print('Logged in as: '+ bot.user.name)
print('Ready!\n')
@bot.command()
async defcommandname(ctx, *, somevariable)
#If you don't need a variable, then you only need (ctx)
# """Command description"""
Code goes here
await ctx.send('Message')
bot.run('yourtoken')
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