20
loading...
This website collects cookies to deliver better user experience
[](url)
Discord.py is a very fantastic API. It helps us in creating Discord bots easily. People have made game bots, RPG bots, Moderation Bots, Economy bots, and even more! Using this guide, you can learn how to use it.pip install discord.py
discord.Client
or commands.Bot
.discord.Client
:commands.Bot
:commands.Bot
.discord
and discord.ext.commands
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="$")
bot.run('YOUR TOKEN HERE')
bot
or client
.@bot.command(name='command_name', description="description for help command")
async def command(ctx, other_arguments_here):
# Tell bot what to do here
ctx.author
for doing this:@bot.command(name='Hello', description="Greets the sender")
async def hello(ctx):
await ctx.reply(f"Hello {ctx.author.name}!")
# f-string