Created
November 20, 2017 21:53
-
-
Save WoodProgrammer/06155d232f4919f1481050219764b442 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 telegram | |
| from telegram.ext import Updater, CommandHandler, MessageHandler, Filters | |
| import requests,json | |
| from photo2Down import Photo2Down | |
| TOKEN = "YOUR_TOKEN" | |
| updater = Updater(token=TOKEN) | |
| dispatcher = updater.dispatcher | |
| photo_wrapper = Photo2Down(TOKEN) | |
| def Start(bot, update): | |
| bot.sendMessage(chat_id=update.message.chat_id, text = "Hello Test.") | |
| def test2(bot,update): | |
| file_id = update.message.photo[2].file_id ##picture_id | |
| photo_wrapper.download(file_id) | |
| dispatcher.add_handler(MessageHandler(Filters.photo, test2)) | |
| updater.start_polling() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment