Skip to content

Python code snippet – How to make a discord bot ?

import discord
from discord.ext import commands

bot = commands.Bot(command_prefix="!", description="The description")

@bot.event
async def  on_ready():
    print("Ready !")

@bot.command()
async def ping(ctx):
    await ctx.send('**pong**')

bot.run("enter the token here between the quotes")
See also  How to reverse the in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.