diff --git a/src/assets/i18n/nl/strings.yml b/src/assets/i18n/nl/strings.yml index b2aad42..783ca6d 100644 --- a/src/assets/i18n/nl/strings.yml +++ b/src/assets/i18n/nl/strings.yml @@ -14,7 +14,7 @@ translation : error : - '$[author:mention] **>** Er is een fout opgetreden tijdens het uitvoeren van dit commando' - - 'Als dit probleem zich blijft voordoen, kunt u overwegen lid te worden van *** https: //discord.gg/SV7DAE9*** en uw probleem daar te plaatsen' + - 'Als dit probleem zich blijft voordoen, kunt u overwegen lid te worden van *** https://discord.gg/SV7DAE9*** en uw probleem daar te plaatsen' - '```ini' - '[ Fout Informatie ]' - 'Code = "$[err:code]"' diff --git a/src/commands/Discord/Image/cat.js b/src/commands/Discord/Image/cat.js index 886c812..c558692 100644 --- a/src/commands/Discord/Image/cat.js +++ b/src/commands/Discord/Image/cat.js @@ -1,14 +1,15 @@ const { DiscordCommand } = require('../../../core'); const w = require('wumpfetch'); +const l = require('larg'); module.exports = class Cat extends DiscordCommand { constructor(bot) { super(bot, { name : 'cat', - syntax : 'cat', + syntax : 'cat [--lucifer]', aliases : [ 'kitten' ], - argument : [], + argument : [ '[--lucifer]' ], description: 'Get a random cat', hidden : false, @@ -21,19 +22,22 @@ module.exports = class Cat extends DiscordCommand { }); } - async execute(msg) { + async execute(msg, args) { + let img = l(args)['lucifer'] ? `https://wessel.meek.moe/lucifer/${Math.floor(Math.random() * 37)}.jpg` : 'https://aws.random.cat/meow' const message = await msg.channel.createMessage(this.localize(msg.author.locale['image']['fetching'])); - let img = await w('https://aws.random.cat/meow', { headers: { 'User-Agent': this.bot.ua } }).send(); + if (img === 'https://aws.random.cat/meow') { + img = await w(img, { headers: { 'User-Agent': this.bot.ua } }).send(); + img = img.json(); + } let res = await w('https://catfact.ninja/fact?max_length=1500', { headers: { 'User-Agent': this.bot.ua } }).send(); - img = img.json(); res = res.json(); msg.channel.createMessage({ embed: { color : this.bot.col['image']['cat'], - image : { url: img.file ? img.file : '' }, - description: `${this.bot.emote('image', 'cat', '1')} *Random Fact* **>** ${res.fact}\n\n*[\`${msg.author.locale['image']['failed_cache']}\`](${img && img.file ? img.file : 'https://www.google.com/'})*` + image : { url: img.file ? img.file : img }, + description: `${this.bot.emote('image', 'cat', '1')} *Random Fact* **>** ${res.fact}\n\n*[\`${msg.author.locale['image']['failed_cache']}\`](${img && img.file ? img.file : img})*` } }); message.delete();