当获得所有通道以向所有人发送消息时,bot忽略该命令。这是我的代码。
async def lockdown(ctx):
allchannels = bot.get_all_channels()
overwrite = channel.overwrites_for(ctx.guild.default_role)
locked = overwrite.send_messages = False
await locked.send(allchannels, 'This server has been locked down.')
尝试打印allchannel,您将看到出错的地方。你不能这样使用bot.get_all_channels()