fetchEmojis
Callable
- fetchEmojis(locale: Locale, options: FetchEmojisOptions & { compact: true; flat: true }): Promise<FlatCompactEmoji[]>
- fetchEmojis(locale: Locale, options: FetchEmojisOptions & { compact: true; flat?: false }): Promise<CompactEmoji[]>
- fetchEmojis(locale: Locale, options: FetchEmojisOptions & { compact?: false; flat: true }): Promise<FlatEmoji[]>
- fetchEmojis(locale: Locale, options?: FetchEmojisOptions & { compact?: false; flat?: false }): Promise<Emoji[]>
Fetches and returns a localized list of emojis (and optional shortcodes) from our CDN. Uses
fetchFromCDN
andfetchShortcodes
under the hood.It's also possible to load shortcodes from other languages by prefixing the shortcode preset with the chosen locale. This is useful if you want to support English and Japanese in parallel, for example.