Why does 2 @client.command does not works

When I use the 2nd bot command it gives my an error.
This is the error
Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command “coinflip” is not found

This is the code
import discord
import os
import random
from keep_alive import keep_alive
from discord.ext import commands

paint=[0xff0000 , 0x0000ff , 0x000000 , 0x00ffff , 0xffffff , 0xffd700 , 0x4b0082]
heads_tails = ‘Heads’, ‘Tails’
prefix = [’-’]
client = commands.Bot(prefix)
client.remove_command(‘help’)

@client.event
async def on_ready():
await client.change_presence(activity=discord.Game(‘with The Boys’))
print(“Ready to help you.”)

@client.command()
async def help(ctx):
embedVar = discord.Embed(
title=“Help arrived!”,
description=“Here are a list of commands for your help”,
colour=(random.choice(paint)))
embedVar.add_field(name=“Bot Prefix”,
value="-", inline=False)
embedVar.add_field(name=“Moderation Commands”,
value="-help",
inline=True)
embedVar.add_field(name=“Fun commands”, value="-coinflip", inline=True)
embedVar.set_thumbnail(
url= “https://media.discordapp.net/attachments/923531605660815373/974248483479494686/charizard-mega-charizard-y.gif
)
await ctx.channel.send(embed=embedVar)

@client.command()
async def coilflip(ctx):
embedVar = discord.Embed(
title=“Coinflip”,
description=(f’You got {random.choice(heads_tails)}’),
colour=(random.choice(paint)))
await ctx.channel.send(embed=embedVar)

keep_alive()
client.run(os.getenv(‘Token’))

Looks like name of that function in definition has a typo.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.