[英]How to get photo with caption from user with telebot
我想用 python 在我的 Telegram 機器人上獲得一張帶有標題的照片。
@bot.message_handler(func=lambda message: True)
我想做這樣的事情來獲得帶有標題的照片。
去做這個,
@bot.message_handler(func=lambda message: True, content_types=['photo'])
def some_function(message):
print(message.caption) # This will be your caption.
注意:您不能在任何地方使用message.caption
因為它不適用於短信
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.