I am trying to let my discord bot display the image file of emojis. So you post a emoji and the bot replies with an attached image of the emoji.
It's working for emojis of servers on which the bot is online. But how can i get the url of emojis from other servers?
I search for the emoji with bot.emojis.get But how can i search "outside" of the client "bot"? Or get the url on a different way?
My code for emojis from joined servers:
const emoji = bot.emojis.get(emojiID);
await message.channel.send({files: [
{
attachment: emoji.url,
name: emoji.name + '.png'
}
]});
Another Problem is emoji.animated
is returning undefined
all the time. why?
https://discord.js.org/#/docs/main/stable/class/Emoji?scrollTo=animated