G
G
Good Friend2020-05-05 00:26:28
Python
Good Friend, 2020-05-05 00:26:28

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”?

5eb0887eda9e6516644787.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Yakushenko, 2020-05-05
@Good Friend

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 question

Ask a Question

731 491 924 answers to any question