diff --git a/commands/random-img/gelbooru.js b/commands/random-img/gelbooru.js index 5bba2c30..fd023d0f 100644 --- a/commands/random-img/gelbooru.js +++ b/commands/random-img/gelbooru.js @@ -37,8 +37,8 @@ module.exports = class GelbooruCommand extends Command { const { posts } = await xml.parseStringAsync(text); if (posts.$.count === '0') return msg.say('No Results.'); return msg.say(stripIndents` - Result for ${query}: - https:${posts.post[Math.floor(Math.random * posts.post.length)].$.file_url} + ${query ? `Result for ${query}:` : 'Random Image:'} + https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url} `); } }; diff --git a/commands/random-img/rule34.js b/commands/random-img/rule34.js index 9a94a2e4..e17b1c21 100644 --- a/commands/random-img/rule34.js +++ b/commands/random-img/rule34.js @@ -37,7 +37,7 @@ module.exports = class Rule34Command extends Command { const { posts } = await xml.parseStringAsync(text); if (posts.$.count === '0') return msg.say('No Results.'); return msg.say(stripIndents` - Result for ${query}: + ${query ? `Result for ${query}:` : 'Random Image:'} https:${posts.post[Math.floor(Math.random() * posts.post.length)].$.file_url} `); }