Now you can have as many "or"s as you want

This commit is contained in:
SileNce5k 2022-04-12 21:37:01 +02:00
parent 0181007ad5
commit e359603352
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -7,7 +7,7 @@ module.exports = {
let answer = randomNumber(0, 1) === 1 ? "Yes" : "No"; let answer = randomNumber(0, 1) === 1 ? "Yes" : "No";
if(args.length > 2 && args.includes("or")){ if(args.length > 2 && args.includes("or")){
let question = args.join(" ").split("or "); let question = args.join(" ").split("or ");
answer = randomNumber(0, 1) === 1 ? question[0] : question[1]; answer = question[randomNumber(0, question.length -1)];
} }
message.channel.send(answer) message.channel.send(answer)
} }