From 0a3c5ebb5ebcdd341c7a7e90df6445e4508a165a Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Wed, 28 Jun 2023 15:21:58 +0200 Subject: [PATCH] add line about where an emoji is from --- commands/message/utils/emoji.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/message/utils/emoji.js b/commands/message/utils/emoji.js index 88a0dc1..c228f5c 100644 --- a/commands/message/utils/emoji.js +++ b/commands/message/utils/emoji.js @@ -8,6 +8,7 @@ const { icon, pill, iconPill, highlight } = require("../../../labscore/utils/mar const { editOrReply } = require("../../../labscore/utils/message"); const { STATICS } = require("../../../labscore/utils/statics"); const { Components } = require("detritus-client/lib/utils"); +const { bold } = require("detritus-client/lib/utils/markup"); const onlyEmoji = require('emoji-aware').onlyEmoji; @@ -78,8 +79,11 @@ module.exports = { let form = '.png' if(matches[0].animated) form = '.gif' + const tagline = '' + if(context.guild.emojis.find((e)=>e.id == matches[0].id)) tagline == `\nThis emoji is from ${bold(context.guild.name)}` + return editOrReply(context, createEmbed("default", context, { - description: `${iconPill("emoji", `:${matches[0].name}:`)} ${highlight(`(${matches[0].id})`)}`, + description: `${iconPill("emoji", `:${matches[0].name}:`)} ${highlight(`(${matches[0].id})`)}${tagline}`, image: { url: `https://cdn.discordapp.com/emojis/${matches[0].id}${form}?size=4096` }