#how do i make the event not getting spammed

1 messages · Page 1 of 1 (latest)

median creek
shadow lagoon
median creek
#
@client.event 
async def on_command_error(ctx, error): 
 if isinstance(error, commands.CommandNotFound):
  em = discord.Embed(title=f"<a![ERROR](https://cdn.discordapp.com/emojis/997084133794787428.webp?size=128 "ERROR")997084133794787428> Error <a![ERROR](https://cdn.discordapp.com/emojis/997084133794787428.webp?size=128 "ERROR")997084133794787428>", description=f"Command not found. Please check your spelling.", color=0xFF0000) 
  message = await ctx.send("<a![loading](https://cdn.discordapp.com/emojis/827510929205886976.webp?size=128 "loading")999568871105232936>")
  await asyncio.sleep(5)
  await message.delete()
  await ctx.send(embed=em)```
median creek
#

Can someone help?

kindred flare
#

Are there any errors?

#

if you got error, pls paste it

median creek
kindred flare
#

I don't think this code cannot be a spam.

shadow lagoon