Advertisement
YoJxsn

Untitled

Nov 5th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 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(client.prefix.length+6)
  10. if(!question){
  11. return message.reply("you did not specify your question.")
  12. } else {
  13. let responses = [
  14. "Yes",
  15. "No",
  16. "Maybe",
  17. "Why would you even ask that",
  18. ]
  19. let Response = responses[Math.floor(Math.random()*(responses.length))]
  20. let Embed = new MessageEmbed()
  21. .setTitle('Ask')
  22. .setDescription(`Your question: ${question}\nMy reply: ${response}`)
  23. message.channel.send(Embed)
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement