L
L
Lol Likovic2020-07-02 08:31:51
Python
Lol Likovic, 2020-07-02 08:31:51

How to make a discord bot send statistics of messages of users who sent them at the end of the day?

In general, I need the bot to send statistics of users who sent messages. That is, those that were not sent, he will not show. In general, for counting messages, I use:

user_counter = {}
...
try:
  user_counter[message.author.id] += 1
except KeyError:
  user_counter[message.author.id] = 1

And how to make it show the statistics of all users? Thanks in advance for the answers The
question is exactly how to show the statistics of ALL users, not just one, I just do not understand how to do it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cython, 2020-07-02
@Lolik666

You can run a loop with sleep for a day and call the send and clear function in a separate thread, or do the same, but through the schedule library, and run it in a separate thread.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question