Hide keyboard and send message

This commit is contained in:
GiovaniFZ 2024-06-02 17:06:00 -03:00
parent 6120158d4f
commit 8cb5e30c61

View File

@ -11,11 +11,43 @@ module.exports = function(bot, msg) {
[{text: 'She/Her'}],
[{text: 'They/Them'}],
],
}
},
parse_mode: 'Markdown'
};
const message = "Select your pronouns:";
const message2 = "You selected He/Him";
const message3 = "You selected She/Her";
const message4 = "You selected They/Them";
bot.sendMessage(chatId, message, opts,{ parse_mode: 'Markdown' })
bot.sendMessage(chatId, message, opts)
.catch(error => console.error('WARN: Message cannot be sent: ', error));
bot.onText('He/Him', (msg) => {
bot.sendMessage(msg.chat.id, message2, {
reply_markup: {
remove_keyboard: true
}
})
.catch(error => console.error('WARN: Message cannot be sent: ', error));
});
bot.onText('She/Her', (msg) => {
bot.sendMessage(msg.chat.id, message3, {
reply_markup: {
remove_keyboard: true
}
})
.catch(error => console.error('WARN: Message cannot be sent: ', error));
});
bot.onText('They/Them', (msg) => {
bot.sendMessage(msg.chat.id, message4, {
reply_markup: {
remove_keyboard: true
}
})
.catch(error => console.error('WARN: Message cannot be sent: ', error));
});
}