nextcord 斜杠命令出错

Have an error with nextcord slash commands

所以我正在尝试添加对斜线命令的支持,但出于某种原因它说: AttributeError: 'NoneType' object has no attribute 'delete' 它主要来自 await ctx.message.delete(ctx.delete) 我找不到任何解决方案。 这是我的代码:

@client.slash_command(name="tempmute", description="temporary mutes a member from the server")
async def tempmute(ctx, member: nextcord.Member,time):
    muted_role=nextcord.utils.get(ctx.guild.roles, name="Muted")
    time_convert = {"s":1 , "m":60, "h":3600,"d":86400}
    tempmute= int(time[0]) * time_convert[time[-1]]
    await ctx.message.delete(ctx.delete)
    await member.add_roles(muted_role)
    embed = nextcord.Embed(description= f"✅ **{member.display_name}#{member.discriminator} muted successfuly**", color=nextcord.Color.green())
    await ctx.send(embed=embed, delete_after=5)
    await nextcord.sleep(tempmute)
    await member.remove_roles(muted_role)    

在没有消息的情况下调用斜杠命令,并且没有任何内容可删除,即 ctx.messageNone(因此出现错误)。 await ctx.message.delete(ctx.delete) 行在斜杠命令设置中完全多余,可以简单地删除