#count how many times someone has been mentioned
1 messages · Page 1 of 1 (latest)
Go through channel.history and check if the user is in the mentions. If yes then add to a counter
well...
i just started learning pycord and i dont know how...
can you help me?
1st one
See the examples on GitHub to know how the library is used
And don't forget the guide too
https://guide.pycord.dev
i know how to loop though the chat history
i dont know how to check for a specific word (mention) in a message
Did you even check the docs link? It tells you how to iterate through the chat history
Oh wait sorry
I thought you said you didn't know how to iterate
My bad
Well you can do if "word" in msg.content
what error does it give?
ima send a screen shot
it runs but when i execute the command it doesn`t work
Try conveting user to string
user=str(user)
okay, try this
x=str(user)
if x in msg.contet:
count+=1
ok well um
it doesnt give an error
but the number is 0 like it doesnt see the mention
User is a member. Do user.mention
finally it worked
thx a lot!