Guest User

Untitled

a guest
Nov 9th, 2020
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. const { MessageEmbed } = require ("discord.js")
  2.  
  3. module.exports = {
  4. name: '8ball',
  5. description: "Ask the 8ball anything you want!",
  6. execute(message){
  7. const prefix = "bow"
  8. const args = message.content.slice(prefix.length).slice("ball").trim().split(" ").join(" ");
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. if(args.length < 2) {
  16. const errorEmbed = new MessageEmbed()
  17. .setTitle("Not enough arguments")
  18. .addField("Error","Next time, provide a question you want to ask the 8ball.")
  19. .setColor(0x0000ff)
  20. .setFooter(`Triggered by ${message.author.usertag}`, message.author.displayAvatarURL({ dynamic: true}))
  21.  
  22. message.channel.send(errorEmbed)
  23.  
  24. }
  25. else {
  26. const answers = [
  27. {Rating : 0, message : "Yes"},
  28. {Rating : 0, message : "yes idiot"},
  29. {Rating : 0, message : "Why would that be a no?"},
  30. {Rating : 0, message : "Ofcourse yes!"},
  31. {Rating : 0, message : "The law requires that I answer \"yes\""},
  32. {Rating : 0, message : "YAAAS!"},
  33. {Rating : 0, message : "Thats a 100% yes"},
  34. {Rating : 0, message : "ofcourse! ofcourse yes!"},
  35. {Rating : 0, message : "yes. ofcourse yes! Are you dumb?"},
  36.  
  37.  
  38. {Rating : 1, message : "Probably"},
  39. {Rating : 1, message : "Probably not"},
  40. {Rating : 1, message : "idk m8, could be yes but could be no."},
  41. {Rating : 1, message : "I shouldn't tell you now"},
  42. {Rating : 1, message : "try again pls"},
  43. {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."},
  44.  
  45. {Rating: 3, message : "no"},
  46. {Rating: 3, message : "no idiot"},
  47. {Rating: 3, message : "Why would that be a yes?"},
  48. {Rating: 3, message : "No ofcourse not. Are you dumb?"},
  49. {Rating: 3, message : "NOOOOOOOO"},
  50. {Rating: 3, message : "The law requires that I answer \"no\""},
  51. {Rating: 3, message : "That's a 100% no."},
  52. {Rating: 3, message : "ofcourse! ofcourse no!"}
  53.  
  54. ]
  55. const answer = answers[Math.floor(Math.random() * answers.length)]
  56.  
  57. const answerEmbed = new MessageEmbed()
  58. .setTitle('THE 8-BALL HAS SPOKEN')
  59. .setDescription(`question: ${args}`)
  60. .addField("Answer", `${answer.message}`)
  61. .setFooter(`Requested by ${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true}))
  62. .setColor("RANDOM")
  63.  
  64. message.channel.send(answerEmbed)
  65.  
  66. }
  67.  
  68.  
  69.  
  70.  
  71.  
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment