Skip to content

Instantly share code, notes, and snippets.

@eteamin
Last active September 17, 2017 21:09
Show Gist options
  • Save eteamin/bb6274e66ca548ae793416cb0c37fce4 to your computer and use it in GitHub Desktop.
Save eteamin/bb6274e66ca548ae793416cb0c37fce4 to your computer and use it in GitHub Desktop.
from telegram import Bot
bot = Bot(token='token')
offset = 0
while True:
updates = bot.get_updates(offset=offset)
for update in updates:
if update:
offset = update.update_id + 1
bot.send_message(update.message.chat.id, update.message.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment