Skip to content

Instantly share code, notes, and snippets.

@tsnoam
Last active June 3, 2017 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsnoam/33136241f89b6401f4d4cc1cc1d7865f to your computer and use it in GitHub Desktop.
Save tsnoam/33136241f89b6401f4d4cc1cc1d7865f to your computer and use it in GitHub Desktop.
ptb netfluc recreate & log
import logging
from telegram import *
from telegram.__main__ import main as tmain
from telegram.ext import *
logging.basicConfig(format='%(asctime)-15s %(message)s', level=logging.DEBUG)
def start(bot, update):
bot.send_message(update.message.chat_id, "Got message")
def main():
updater = Updater(token='PUT_TOKEN_HERE')
dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler('start', start))
updater.start_polling()
if __name__ == '__main__':
tmain()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment