nextcord.ext Command not found

339 Views Asked by At

Terminal keeps telling me that my client.command for hello is not found, the client.event also will not work when I type the specific message. the client command with the aliases does work however, can anyone point me in the right direction? Much appreciated

import discord
from discord.ext import commands


client = commands.Bot(command_prefix='!')

@client.event
async def on_ready():
    print('Spark is online')

@client.command()
async def hello(ctx):
    await ctx.reply("Hi there, I'm Spark")


@client.command(aliases=['yes', 'agreed'])
async def ofcourse(ctx):
    await ctx.send("Yes, that's correct!")

@client.event
async def on_message(message):
    if client.user.id != message.author.id:
        if message.content.lower() == 'i love you spark':
            await message.reply("This just got weird....")
        if message.content.lower() == 'this server is cool':
            await message.reply("Of course it is, I'm in here!")
    await client.process_commands(message)
1

There are 1 best solutions below

1
On

Try This

@client.command(name='hello')
async def cmdhello(ctx):
    await ctx.reply("Hi there, I'm Spark")

If you facing any error with this command or any other command feel free to join Help server