如何检测用户对频道消息的“点赞”、“喜欢”、“不喜欢”等反应

问题描述 投票:0回答:1

当我点击频道上的“喜欢”时,下面的代码没有检测到任何内容。我不知道我的代码有什么问题。

# pyTelegramBotAPI   Version  4.14.1

import telebot
from telebot import apihelper
from telebot import types
from telebot import util
from telebot.types import ChatMemberUpdated
from telebot.util import update_types

......

@bot.callback_query_handler(func=lambda call: True)
def handle_callback_query(call):
    print(call)
    if call.data == "like":
        print("user likes!!!")
.....

# in main function:

bot.infinity_polling(allowed_updates=update_types)
python telegram-bot py-telegram-bot-api telebot
1个回答
0
投票

目前 Telegram 机器人无法看到对消息的反应,telegram 只是不提供此数据,您可以尝试使用内联或键盘按钮。

© www.soinside.com 2019 - 2024. All rights reserved.