Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { MessageEmbed } = require ("discord.js")
- module.exports = {
- name: '8ball',
- description: "Ask the 8ball anything you want!",
- execute(message){
- const prefix = "bow"
- const args = message.content.slice(prefix.length).slice("ball").trim().split(" ").join(" ");
- if(args.length < 2) {
- const errorEmbed = new MessageEmbed()
- .setTitle("Not enough arguments")
- .addField("Error","Next time, provide a question you want to ask the 8ball.")
- .setColor(0x0000ff)
- .setFooter(`Triggered by ${message.author.usertag}`, message.author.displayAvatarURL({ dynamic: true}))
- message.channel.send(errorEmbed)
- }
- else {
- const answers = [
- {Rating : 0, message : "Yes"},
- {Rating : 0, message : "yes idiot"},
- {Rating : 0, message : "Why would that be a no?"},
- {Rating : 0, message : "Ofcourse yes!"},
- {Rating : 0, message : "The law requires that I answer \"yes\""},
- {Rating : 0, message : "YAAAS!"},
- {Rating : 0, message : "Thats a 100% yes"},
- {Rating : 0, message : "ofcourse! ofcourse yes!"},
- {Rating : 0, message : "yes. ofcourse yes! Are you dumb?"},
- {Rating : 1, message : "Probably"},
- {Rating : 1, message : "Probably not"},
- {Rating : 1, message : "idk m8, could be yes but could be no."},
- {Rating : 1, message : "I shouldn't tell you now"},
- {Rating : 1, message : "try again pls"},
- {Rating : 1, message : "The fact that you are asking this to a bot shows that you are either always sarcastic or dumb. You still believe that all I saw are 100% true or just asking for fun. Go get help."},
- {Rating: 3, message : "no"},
- {Rating: 3, message : "no idiot"},
- {Rating: 3, message : "Why would that be a yes?"},
- {Rating: 3, message : "No ofcourse not. Are you dumb?"},
- {Rating: 3, message : "NOOOOOOOO"},
- {Rating: 3, message : "The law requires that I answer \"no\""},
- {Rating: 3, message : "That's a 100% no."},
- {Rating: 3, message : "ofcourse! ofcourse no!"}
- ]
- const answer = answers[Math.floor(Math.random() * answers.length)]
- const answerEmbed = new MessageEmbed()
- .setTitle('THE 8-BALL HAS SPOKEN')
- .setDescription(`question: ${args}`)
- .addField("Answer", `${answer.message}`)
- .setFooter(`Requested by ${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true}))
- .setColor("RANDOM")
- message.channel.send(answerEmbed)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment