Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to count discord chat messages with python

counter = 0
repeat = 0
for x in range(0, 4): # Repeats 4 times
    async for msg in client.logs_from(message.channel, limit=500):
        if msg.author == message.author:
            counter += 1
    repeat += 1
await client.send_message(message.channel, "{} has {} out of the first {} messages in {}".format(message.author, str(counter), 500*repeat, message.channel))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #discord #chat #messages #python
ADD COMMENT
Topic
Name
6+9 =