Last active
June 3, 2017 20:06
-
-
Save tsnoam/33136241f89b6401f4d4cc1cc1d7865f to your computer and use it in GitHub Desktop.
ptb netfluc recreate & log
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
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