Answer the question
In order to leave comments, you need to log in
How to make the bot count the number of messages of all participants on the server and at the end of each make a rating of “top 3 players for the previous day”?
Answer the question
In order to leave comments, you need to log in
You make a database with, for example, the Users table, where there will be id and messages_count, last_day fields, in messages_count after each user message you make +1, at the end of the day, cron (as an option) runs a script that transfers the value from messages_count to last_day, and messages_count resets. In the main script, you pull out the required number of users with the sorting parameter by last_day. By analogy, you can do for each week / month / so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question