23 lines
560 B
JavaScript
Raw Normal View History

2024-06-02 00:26:48 +00:00
module.exports = function(bot, msg) {
2024-05-31 17:42:59 -03:00
const chatId = msg.chat.id;
const userName = msg.from.first_name;
let isGay = "";
function getRandomInt(max) {
return Math.floor(Math.random() * max);
2024-06-02 00:26:48 +00:00
}
2024-05-31 17:42:59 -03:00
const randomValue = getRandomInt(2);
if (randomValue === 0) {
2024-06-02 00:26:48 +00:00
isGay = `*You (${userName}) are not gay.*`;
2024-05-31 17:42:59 -03:00
} else {
2024-06-02 00:26:48 +00:00
isGay = `*Yes, you (${userName}) are gay.*`;
}
2024-05-31 17:42:59 -03:00
const message = `${isGay}`;
2024-06-02 00:26:48 +00:00
bot.sendMessage(chatId, message, { parse_mode: 'Markdown' })
2024-06-02 13:27:01 +00:00
.catch(error => console.error('WARN: Message cannot be sent: ', error));
2024-06-02 00:26:48 +00:00
}