【发布时间】:2017-11-28 05:35:12
【问题描述】:
我正在开发一个机器人,希望用户在回复之前的消息时调用它。因此,您将使用 bot 命令回复消息。
举例
用户 1:Hello World
用户2:(回复Hello World)/命令测试消息
现在我只能获取直接在命令中发送的文本(“测试消息”),但不能获取第一条消息(“Hello World”)。根据他们的documentation,我应该可以从reply_to_message 得到它。但是,我在 webhook 的日志中看到的只是这个。
event: {
body: {
update_id: 5632431,
message: {
message_id: 43,
from: {
id: < my_user_id > ,
first_name: 'User 2',
username: 'user_2_username',
language_code: 'en'
},
chat: {
id: < chat_id > ,
title: < chat_name > ,
type: 'group',
all_members_are_administrators: true
},
date: 1498342725,
text: '/command test message',
entities: [{
type: 'bot_command',
offset: 0,
length: 5
}]
}
}
}
我做错了吗?有人有收到回复消息的经验吗? 任何帮助将不胜感激。
【问题讨论】:
标签: telegram telegram-bot