this is my purge command. I am very new to slash commands.
@bot.command(name="purge", description="Purge a specific amount of messages.", guild=guild_ID)
@commands.guild_only()
@commands.has_permissions(manage_messages=True)
async def purge(ctx: discord.Interaction, num_messages: int):
if num_messages < 1:
await ctx.response.send_message("You must provide a valid number of messages to delete.", ephemeral=True)
return
deleted = await ctx.channel.purge(limit=num_messages)
embed = discord.Embed(title="", description=f"✅ Deleted {len(deleted)} messages.")
await ctx.response.send_message("", ephemeral=True, embed=embed)
this is the error i am geting "404 Not Found (error code: 10062): Unknown interaction"
I have now tried searching everywhere on github/stackoverflow to find a solution on my problem