Python 删除和克隆时诉诸通道 @client.command() @commands.has_权限(manage_messages=True) 异步def nuke(ctx): 等待ctx.channel.delete() newchannel=await ctx.channel.clone(reason=“频道已被屏蔽”) 等待新频道。发送(“Nuked this channel

Python 删除和克隆时诉诸通道 @client.command() @commands.has_权限(manage_messages=True) 异步def nuke(ctx): 等待ctx.channel.delete() newchannel=await ctx.channel.clone(reason=“频道已被屏蔽”) 等待新频道。发送(“Nuked this channel,python,discord,discord.py,Python,Discord,Discord.py,默认情况下,它应该在相同的位置创建,如果不是,您可以简单地。使用旧频道位置的位置编辑 @client.command() @commands.has_权限(manage_messages=True) 异步def nuke(ctx): 等待ctx.channel.delete() newchannel=await ctx.channel.clone(reason=“频道已被屏蔽”) #在这里编辑位置 等待newchannel.edit(position=ctx.channel.position)

默认情况下,它应该在相同的位置创建,如果不是,您可以简单地
。使用旧频道位置的
位置编辑

@client.command()
@commands.has_权限(manage_messages=True)
异步def nuke(ctx):
等待ctx.channel.delete()
newchannel=await ctx.channel.clone(reason=“频道已被屏蔽”)
#在这里编辑位置
等待newchannel.edit(position=ctx.channel.position)

等待newchannel.send(“Nuked this channel thank you it works:”)如果有帮助,请确保接受答案