Hide keyboard and send message #4

Merged
mthlma merged 1 commit from main into main 2024-06-02 21:53:24 +00:00

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));
});
}