Adding CacheData.emojis
See original GitHub issueSo it will be good that if you make all emojis from all guilds cache for cache
variable! Which will collect all emojis from all guilds. It will be good if you make a getter which will return the cache of all global emojis. This is easy to make but will be good if its built in!
https://github.com/discordeno/discordeno/blob/main/src/api/controllers/cache.ts
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Caching custom emojis from another shard - Stack Overflow
In Discord messages, custom emoji are represented like this: ... any broadcast evals, or anything of the sort: you only need static data....
Read more >Emojis in Cache Names - Website - Geocaching Forums
When there is an emoji in the middle (or end) of the cache title, everything up to that emoji is displayed correctly. Needless...
Read more >Emoji Cache: LRU Implementation using Emojis for Identifiers
I'm thinking about usernames, identifiers, etc. Upvote
Read more >How To Clear Recently Used Emojis on Samsung Keyboard
If you are using Samsung smartphone you may notice that there is no option to clear recently used emoticons. I found easy fix...
Read more >emojis JavaScript and Node.js code examples - Tabnine
handle(emoji) { emoji.guild.emojis.cache.delete(emoji.id); ... guild.emojis.add(createdEmoji); /** * Emitted whenever a custom emoji is created in a guild.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this is a fair request tbh, i’ve myself needed this at times but i also see everyones points as well. In my opinion, perhaps there are some things everyone is not taking into consideration.
Current:
guild.emojis
is very performant!Proposed:
guild.emojis
is still fast but lot slower compared to before. Why because everytime you write guild.emojis, whats actually happening behind the scenes is a massive loops on every single emoji in existance. First it has to iterate and make an array then it has to iterate and filter out emojis not in this guild then create a new collection for the remaining ones.MY IDEA:
We add a
cache.emojis
that is a getter that combines all the emojis from all guilds. Emojis therefore remain inguild
which keeps guild.emojis optimal! It also allows a cache.emojis when it is desired(i’ve needed thismyself as well so i understand the desire), and it is the best performance wise because you are unlikely to do cache.emojis except when you want all emojis.Thats what i am actually requesting for.