Skip to content

Instantly share code, notes, and snippets.

@josegomezr
Last active August 22, 2019 14:48
Show Gist options
  • Save josegomezr/409dcf3c43daa8e305c618b756c6c3ef to your computer and use it in GitHub Desktop.
Save josegomezr/409dcf3c43daa8e305c618b756c6c3ef to your computer and use it in GitHub Desktop.
TrollBots.py
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