Here is the error code :
`line 13, in on_message
if message.content.find (f"""!{member.mention} need love""") != -1:
AttributeError: 'list' object has no attribute 'mention'`
Here is code :
Expand|Select|Wrap|Line Numbers
- @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. ♥♥♥♥♥""")