Add 8ball command for yes or no responses

main
kry008 2024-05-30 11:36:41 +02:00
parent 2c88c3373b
commit f426a022f8
1 changed files with 34 additions and 0 deletions

34
commands/8ball.js 100644
View File

@ -0,0 +1,34 @@
function eightBall() {
//yes - 999:2000
//no - 999:2000
//maybe - 1:1000
var rand = Math.floor(Math.random() * 3000);
if(rand < 1000) {
return "Yes";
} else if(rand < 2000) {
return "No";
} else {
return "Maybe";
}
}
module.exports = {
name: '8ball',
description: 'Yes or No?',
help: 'Yes or No?',
options: [],
slash: true,
text: true,
admin: false,
requireKick: false,
requireBan: false,
canBeUsedInDm: true,
contexts: ['GUILD_TEXT', 'GUILD_VOICE', 'DM'],
integration_types: [0,1],
execute(message, args) {
message.channel.send(eightBall());
},
executeSlash(interaction) {
interaction.reply(eightBall());
},
};