#how do i make the event not getting spammed
1 messages · Page 1 of 1 (latest)
Then don't respond if its an invalid command
Hmm ok
@client.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandNotFound):
em = discord.Embed(title=f"<a997084133794787428> Error <a997084133794787428>", description=f"Command not found. Please check your spelling.", color=0xFF0000)
message = await ctx.send("<a999568871105232936>")
await asyncio.sleep(5)
await message.delete()
await ctx.send(embed=em)```
Can someone help?
No errors
I don't think this code cannot be a spam.
Uh y'know that event only triggers when an error occurs in a command, so it's not like you can spam the event unless ur commands keep throwing errors