【发布时间】:2021-09-08 06:04:34
【问题描述】:
我试图发出一个命令来删除针对 nuke bot 的 nuke 频道, 这是我的代码:
async def inferno(ctx,problem):
if problem == ("channelnuke"):
channel == ("Nuke-channel")
await ctx.send("okay solving problem")
await ctx.send("Guard on, every nuke channel will be instant deleted")
while True:
await channel.delete()
但它给出了一个错误,即不和谐没有属性删除
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord.channel' has no attribute 'delete'
有人知道应该怎么做吗?
【问题讨论】:
-
while 循环的目的是什么?
标签: python discord command discord.py bots