Is there a way to make it so for example, you send 1000 messages per second and you send the first 1000 messages to then wait like 1 second and continue?
I'm not quite sure what the question is?
I think what you want is to send 1000 messages in 1 second, then wait 1 second, and repeat? If so, you could have something like this:
import time while True: # repeats forever number_of_times = 1000 for each in xrange(number_of_times): # send message # this will wait 1/number_of_times seconds - if you do # this number_of_times times, then it will add up to 1 second time.sleep(1/number_of_times) # then wait 1 second before starting again time.sleep(1)
Please correct me if I've misunderstood, or upvote if this helps :)
@MATTHEWBECHTEL That's because you're not doing anything apart from looping.
# send message
with something like
(This will cause it to crash though, so you may want to replace the
while True with something like
for n in range(5). Even so, it will probably take longer than 1 second just because