错误"list"对象在python中没有属性"reference"
当我运行我的文件时,没有问题,当我执行命令时,我得到一个错误代码,我不知道如何重新读取,我没有创建列表。
以下是错误代码:
`第13行,在On_Message中
If Message.Content.find(f""!{MEMBER.ADE}需要爱"")!=-1:
AttributeError:'List'对象没有'提及'属性`
以下是代码:
选择 | 换行 | 行号
- @client.event
- async def on_message(message):
- id = client.get_guild(***)
- channels = ["commands"]
- member = message.mentions or message.author
- if str(message.channel) in channels :
- if message.content.find (f"""!{member.mention} need love""") != -1:
- await message.channel.send(f"""Oooooh {member.mention}, we love you,
- you are beautiful, amazing, valid, and the {id.member_count} people
- on this server care about you. ♥♥♥♥♥""")