Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
123
rated 0 times [  128] [ 5]  / answers: 1 / hits: 33824  / 4 Years ago, sat, may 23, 2020, 12:00:00

I'm trying to make my bot send an emoji whenever I Type =emoji



I've managed to get everything done but I have no idea how to make the bot send an emoji by the ID of the emoji.



Any help would be appreciated!


More From » discord.js

 Answers
0

Do you know the name of the emoji? if so, you can simply do this:



message.channel.send(<:emoji name:emoji id>)


If not, you could possibly do,



const emoji = bot.emojis.cache.get(emoji id)

message.channel.send(`${emoji}`)


I assume the emoji has to be cached for the method above to work, i'm sure someone else could brew up a better solution.



Hope i could help!


[#50926] Thursday, May 14, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kristineterrak

Total Points: 74
Total Questions: 109
Total Answers: 115

Location: Anguilla
Member since Sun, Jan 29, 2023
1 Year ago
;