通过pyrogram
,get_history
,读取到对方机器人发送的如下message
,有没有方法可以通过pyrogram
的api
,模拟点击reply_markup
中的签到(checkin)
按钮?
以下的四个好像都不对,尤其是那个 query_id ,这个是发送方随机生成的吗(用来标识便于把结果和请求对应起来)?
await app.send_inline_bot_result(_id, message.chat.id, "checkin", reply_to_message_id=message.id, )
await message.reply_inline_bot_result(message.id, "checkin")
await message.edit_reply_markup(message.reply_markup.inline_keyboard[1][0])
await app.answer_callback_query(message.id, "checkin")
{
"_": "Message",
"id": 99075,
"from_user": {
"_": "User",
"id": *********,
"is_self": false,
"is_contact": false,
"is_mutual_contact": false,
"is_deleted": false,
"is_bot": true,
"is_verified": false,
"is_restricted": false,
"is_scam": false,
"is_fake": false,
"is_support": false,
"is_premium": false,
"first_name": "333",
"username": "******",
"dc_id": 5,
"photo": {
"_": "ChatPhoto",
"small_file_id": "AQADBQAEuDEbbLBJVQAQAgAD3e8ZlAEAA4qgtQNkdRPaAAQeBA",
"small_photo_unique_id": "AgAEuDEbbLBJVQ",
"big_file_id": "AQADBQAEuDEbbLBJVQAQAwAD3e8ZlAEAA4qgtQNkdRPaAAQeBA",
"big_photo_unique_id": "AgAEuDEbbLBJVQ"
}
},
"date": "2024-01-23 17:25:58",
"chat": {
"_": "Chat",
"id": *********,
"type": "ChatType.BOT",
"is_verified": false,
"is_restricted": false,
"is_scam": false,
"is_fake": false,
"is_support": false,
"username": "******",
"first_name": "333",
"photo": {
"_": "ChatPhoto",
"small_file_id": "AQADBQAEuDEbbLBJVQAQAgAD3e8ZlAEAA4qgtQNkdRPaAAQeBA",
"small_photo_unique_id": "AgAEuDEbbLBJVQ",
"big_file_id": "AQADBQAEuDEbbLBJVQAQAwAD3e8ZlAEAA4qgtQNkdRPaAAQeBA",
"big_photo_unique_id": "AgAEuDEbbLBJVQ"
},
"dc_id": 5
},
"mentioned": false,
"scheduled": false,
"from_scheduled": false,
"has_protected_content": false,
"text": "🌟请选择您要使用的功能",
"outgoing": false,
"reply_markup": {
"_": "InlineKeyboardMarkup",
"inline_keyboard": [
[
{
"_": "InlineKeyboardButton",
"text": "💰 [充值使用付费功能] ",
"callback_data": "recharge"
},
{
"_": "InlineKeyboardButton",
"text": "🤖 [ Bot 功能使用说明] ",
"callback_data": "guide"
}
],
[
{
"_": "InlineKeyboardButton",
"text": "🎁 [签到] ",
"callback_data": "checkin"
},
{
"_": "InlineKeyboardButton",
"text": "🌟 [个人信息] ",
"callback_data": "personal_info"
}
]
]
}
}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.