         url = "https://safebooru.donmai.us#{r[0].file_url}"
         msg.channel.uploadFile request(url), @getFileName(url)
       .catch (e)=>
+        console.error e
         msg.reply 'Something went wrong.'
 
     @registerCommand 'setwaifu', { allowDM: true }, (msg, args, d)=>

        url = "https://danbooru.donmai.us#{r[0].file_url}"
        msg.channel.uploadFile request(url), @getFileName(url)
      .catch (e)=>
        msg.reply 'Something went wrong.'

    @registerCommand 'safebooru', {

      .then ()=>
        msg.reply 'Success.'
      .catch (e)=>
        console.error e
        return msg.reply e.msg if e.msg
        msg.reply 'Something went wrong.'

