discord.ext.commands.errors.CommandInvokeError:命令引发了异常:AttributeError:'Command'对象没有属性'server'

时间:2018-07-23 00:06:36

标签: python discord.py

@FiveStarBot.command(pass_context=True)
async def globalmessage(cxt, *, text : str):
    x = message.server.members
    for member in x:
        await FiveStarBot.send_message(member.name, text)

为什么这行不通?

我是初学者程序员

1 个答案:

答案 0 :(得分:0)

您需要使用x 来解决此消息:

ctx