Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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()
Add Comment
Please, Sign In to add comment