【发布时间】:2021-04-05 03:47:33
【问题描述】:
我的 nuke 命令出现问题,该命令应该删除当前频道并克隆它,清除所有消息。问题是它根本不工作并且不会给出任何错误!
代码
@client.command()
@commands.has_permissions(administrator=True)
async def nuke(ctx):
embed = discord.Embed(
colour=discord.Colour.blue,
title=f":boom: Channel ({ctx.channel.name}) has been nuked :boom:",
description=f"Nuked by: {ctx.author.name}#{ctx.author.discriminator}"
)
nuke_ch = discord.utils.get(ctx.guild.channels, name=ctx.channel.name)
new_ch = await nuke_ch.clone(reason="Being nuked and remade!")
await nuke_ch.delete()
sendem = new_ch.send(embed=embed)
await asyncio.sleep(3)
sendem.delete()
如果您有解决方案,请回答此问题。提前致谢。
【问题讨论】:
标签: python python-3.x discord.py