I'm trying to make a command where when someone types for example '!messages @mee6' it shows how many messages that person has said in the server. So say if I typed "a" "b" "c" then did "!messages"
the bot would reply with "@user has sent 3 messages in this server. Does anyone know if this would be possible and if so how would I go about doing it in discord.py?
The principle is the following:
You'd have to take advantage of the Message Received event. Once a message is received, update the counts for the person, and when the !messages command is ran, display the amount.
Looping through every channel in the server and filtering all messages from the user is extremely inefficient and time taking, as well as it can get your bot ratelimited.
Is it possible to make a command !messages @user