Last active
August 22, 2019 14:48
-
-
Save josegomezr/409dcf3c43daa8e305c618b756c6c3ef to your computer and use it in GitHub Desktop.
TrollBots.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import cycle | |
import telepot | |
bot_tokens = [ | |
# array of string tokens | |
] | |
bots = [telepot.Bot(token) for token in bot_tokens] | |
message = """ | |
... | |
""".strip().split('\n') | |
bot_queue = cycle(bots) | |
for line in message: | |
if not line.strip(): | |
continue | |
bot = next(bot_queue) | |
bot.sendMessage(chat_id, line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment