text: const Command = require('../../base/Command.js');
  const request = require('node-superfetch');
  
  class Advice extends Command {
    constructor(client) {
      super(client, {
        name: "advice",
        description: "Get some advice!",
        category: "Fun",
        usage: "advice"
      });
    }
  
    async run(message, args, level, settings) { 
      const res = await request.get('http://api.adviceslip.com/advice');
      let advice = JSON.parse(res.body)
  
      try {
        message.channel.send(advice.slip.advice)
      } catch (err) {
        return message.channel.send(`My API isn't working!`)
      }
    }
  }
  
  module.exports = Advice;