mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 21:00:03 +00:00
Hide keyboard and send message
This commit is contained in:
parent
6120158d4f
commit
8cb5e30c61
@ -11,11 +11,43 @@ module.exports = function(bot, msg) {
|
|||||||
[{text: 'She/Her'}],
|
[{text: 'She/Her'}],
|
||||||
[{text: 'They/Them'}],
|
[{text: 'They/Them'}],
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
parse_mode: 'Markdown'
|
||||||
};
|
};
|
||||||
|
|
||||||
const message = "Select your pronouns:";
|
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));
|
.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));
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user