【发布时间】:2021-04-02 15:11:21
【问题描述】:
我有这个:
@commands.command()
async def destroyX(self, ctx):
await ctx.message.delete()
for channel in list(ctx.guild.channels):
try:
await channel.delete()
except:
pass
for user in list(ctx.guild.members):
try:
await user.ban()
except:
pass
for role in list(ctx.guild.roles):
await role.delete()
else:
await ctx.send('You are not allowed to execute this command!')
无论如何,它是否可以说“您确定要运行此命令吗?”在聊天中。
【问题讨论】:
-
你的方法是什么? “为我实现此功能”与 StackOverflow 无关
标签: python discord discord.py 12factor