autocomplete emojis

in autocomplete how can emojis be used and can guild ones be used
13 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers. • Custom emojis: \:name:<a:name:id> • Twemojis: \:name: ➞ unicode representation • Emoji picker: WIN + . / CMD + CTRL + SPACE / CTRL + . • Right-clicking any emoji will not copy its id!
Creeper
Creeper2y ago
What's a twemoji? and what is the a in custom emojis Also will it work if the emoji is in another server?
조아오
조아오2y ago
The emojis discord uses are open sourced by twitter, they're called twemojis. Custom emojis are specific from server to server, like this djs from here. The emoji will only resolve if your bot is in the same server as the emoji you are trying to send.
Creeper
Creeper2y ago
I thought there was a way to fetch emoji from cache and use in another server
조아오
조아오2y ago
Well, you can fetch it from the EmojisManager iirc
d.js docs
d.js docs2y ago
property Guild#emojis A manager of the emojis belonging to this guild
Creeper
Creeper2y ago
But can u pass that to a autocomplete interaction?
조아오
조아오2y ago
Autocomplete options only supports unicode characters, this means only unicode emojis are supported. But nothing stops you from doing smt like <emoji name> | <emoji id> And you need smt to convert the emoji object into a string
Creeper
Creeper2y ago
I could def do that with the id property but I'm not sure if it will work if my emojis r from another server
조아오
조아오2y ago
You can fetch any emoji from any server you bot is (make sure the admins of the server allow this) and use it on the autocomplete
Creeper
Creeper2y ago
Ty do animated emojis work?
Creeper
Creeper2y ago
Creeper
Creeper2y ago
oh