Как сделать bot.onReplyToMessage асинхронным?
bot.sendMessage(chatId, `Напишите ответ пользователю:`, {
reply_markup: {
force_reply: true
}
}).then(anwer => {
const replyListenerId = bot.onReplyToMessage(anwer.chat.id, anwer.message_id, msg => {
bot.removeReplyListener(replyListenerId);
supportMessage = bot.sendMessage(chatId, `
<======================>
Ответ:
<======================>`);
console.log(supportMessage);
// bot.pinChatMessage(chatId, supportMessage.message_id);
});
});