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