-1

Some questions about using python-telegram-bot

I'm using python-telegram-bot to create a telegram bot.

I want to forward a graphic message (similar to the one below) to the robot, and the robot removes the image and returns the text.

I didn't find an example in the official documentation.

I hope someone can help me.

enter image description here

I read about Combining filters,like handler = MessageHandler(Filters.forwarded & Filters.photo, callback)

but I don't know how to use them to separate images and text

essesoul
  • 21
  • 6
  • Please change your title "Some questions about using python-telegram-bot" to something pertaining more to the problem, so that this problem can be better searched - consider maybe "How to forward a graphic message to a bot and return the text.". Details about deleting the image can be determined by other users asking questions or you including it in the problem body (which you did). – Shmack Nov 18 '22 at 05:30

1 Answers1

0

I sloved it

just use the code below

def callback(update: Update, context: CallbackContext):
    print(update.message.caption)

then python will print out the text

don't forget to import CallbackContext and Updater

essesoul
  • 21
  • 6