furry and gay added + Code fixes

This commit is contained in:
Lucas Gabriel 2024-05-31 17:40:29 -03:00
parent 419575ebf7
commit 009881efc2
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
5 changed files with 56 additions and 4 deletions

24
src/commands/furry.js Normal file
View file

@ -0,0 +1,24 @@
module.exports = function(bot, msg) {
const chatId = msg.chat.id;
const userName = msg.from.first_name;
const userId = msg.from.id;
let isFurry = "";
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
const randomValue = getRandomInt(2);
if (randomValue === 0) {
isFurry = `${userName} is not furry`;
} else {
isFurry = `${userName} is a furry.`;
}
const message = `${isFurry}`;
bot.sendMessage(chatId, message)
.catch(error => console.error('ERROR: Message cannot be sent:', error));
console.log(`INFO: /furry executed by ${userName}, ${userId}`)
}