R
R
Ruslan Mandzyuk2021-09-12 14:55:06
Python
Ruslan Mandzyuk, 2021-09-12 14:55:06

Why is Discord.py bot not sending messages?

import discord
from discord.ext import commands

TOKEN = '  '
 
bot = commands.Bot(command_prefix='>')

@bot.command()
async def Hi(ctx):
    await ctx.send('Hi')

bot.run(TOKEN)

Instead of sending messages, the bot gives the following error

: Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "hello" is not found

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Mokhovikov, 2021-09-12
@Ryslan_13

Well, it's logical, you call the hello command , which does not exist, that's why it issues CommandNotFound, the command was not found

@bot.command()
async def hello(ctx):
    await ctx.send('Привет!')

Z
Zakkaru, 2021-09-12
@Zakkaru

import discord
from discord.ext import commands
 
bot = commands.Bot ( command_prefix = '>' )

@bot.command()
 async def hi(ctx):
    await ctx.send('Hie')

bot.run(TOKEN)

Try like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question