Thor018
Thor018

Reputation: 3

nextcord.ext Command not found

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)

Upvotes: -1

Views: 361

Answers (1)

DARK FLAME YT
DARK FLAME YT

Reputation: 1

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

Upvotes: -1

Related Questions