Advertisement
YoJxsn

Untitled

Nov 5th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. const BaseCommand = require('../../utils/structures/BaseCommand');
  2. const {MessageEmbed} = require('discord.js')
  3. module.exports = class AskCommand extends BaseCommand {
  4. constructor() {
  5. super('ask', 'fun', []);
  6. }
  7.  
  8. async run(client, message, args) {
  9. let question = message.content.slice(5)
  10. console.log(question)
  11. if(!question){
  12. return message.reply("you did not specify your question.")
  13. } else {
  14. let responses = [
  15. "Yes",
  16. "No",
  17. "Maybe",
  18. "Why would you even ask that",
  19. ]
  20. let Response = responses[Math.floor(Math.random()*(responses.length))]
  21. let Embed = new MessageEmbed()
  22. .setTitle('Ask')
  23. .setDescription(`Your question: ${question}\nMy reply: ${response}`)
  24. message.channel.send(Embed)
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement