Closed gc closed 5 years ago
It's used here: https://github.com/dirigeants/klasa-pieces/blob/e3fadcf0db13cfe2b38cdaedfc19ac25e45a3bf0/commands/Tools/discordemoji.js#L18
The API returns every single emoji together, which is fetched once on init(), and then when the command is used, it searches that cached data.
Not sure what you mean by 'to the constructor', do it in the constructor instead of init?
No, I meant to add this in the constructor, to avoid object shape transitions.
this.emojis = null;
Fetches emojis listed on https://discordemoji.com/ has an optional "count" param
E.g. for 'thinking' emotes:
+discordemoji thinking
.It randomly sorts them first so if theres 100+ thinking emojis, you dont get the same 4 ones each time.