From 08937b3dc7eb0835fed944eaf214e384b1ef912a Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 14 Mar 2021 15:23:41 -0400 Subject: [PATCH] Add tags to sakugabooru --- commands/search/sakugabooru.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/search/sakugabooru.js b/commands/search/sakugabooru.js index 6862819b..d963f7ff 100644 --- a/commands/search/sakugabooru.js +++ b/commands/search/sakugabooru.js @@ -1,5 +1,6 @@ const Command = require('../../structures/Command'); const request = require('node-superfetch'); +const { stripIndents } = require('common-tags'); module.exports = class SakugabooruCommand extends Command { constructor(client) { @@ -41,7 +42,11 @@ module.exports = class SakugabooruCommand extends Command { return post.file_url; }); if (!posts.length) return msg.say('Could not find any results.'); - return msg.say(posts[Math.floor(Math.random() * posts.length)].file_url); + const post = posts[Math.floor(Math.random() * posts.length)]; + return msg.say(stripIndents` + ${post.tags} + ${post.file_url} + `); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); }