Releases: mkody/twitch-emoticons
2.8.0: toObject, fromObject, use your ApiClient
This release, in addition to upgrading our Twurple to 7.x, brings three new features:
Emote.toObject()
(#31 - @Tzahi12345): You can export the data of an emote for caching or offline use.const emote = emoteFetcher.emotes.get('Kappa').toObject(); /* { id: '25', type: 'twitch', code: 'Kappa', animated: false, channel_id: null, set: undefined } */
EmoteFetcher.fromObject()
(#31 - @Tzahi12345): You can import an array of emotes directly into the fetcher.emoteFetcher.fromObject([emote]);
- The
EmoteFetcher
now accepts an object as a third parameter for options. (#33)
The only option for now isapiClient
and it allows you to use your own@twurple/api
'sApiClient
object, in case you already have one or want to manage authentification without app tokens.
Note that the first two parameters ofEmoteFetcher
will be unused in this case and can be left asnull
.const { ApiClient } = require('@twurple/api'); const { StaticAuthProvider } = require('@twurple/auth'); const authProvider = new StaticAuthProvider('<your client id>', '<your token>'); const apiClient = new ApiClient({ authProvider }); const fetcher = new EmoteFetcher(null, null, { apiClient });
2.7.1: Emote's owner might be null; Use `axios` for requests
This release handles the case where 7TV or FFZ emotes might not have an owner
object.
When it happens, the owner
property for the emote will be null
.
This was already the case for BTTV. Check for nullable values!
Typings were updated/fixed to reflect that.
This project also switched to axios
to make API requests to the 3rd party emotes services.
got
12.x requires us to switch to ESM but I'm not 100% comfortable in doing so yet. And axios
got better since the last time I checked.
This change should be transparent for everyone.
2.7.0: BTTV WEBP; FFZ global, animated and modifier emotes support
This release introduces quite some changes.
- An
animated
property is now present on emotes if they are supposed to be animated. - We now load the WEBP version of BetterTTV emotes.
- The
SEVENTV
constant is now calledSevenTV
- in case you used it. - The package now supports animated emotes from FrankerFaceZ. They are hosted at a different CDN address.
- Added support to load the FFZ global emotes.
- When you fetch any FFZ global or channel emotes, the package will fetch the list of "modifier" emotes once.
- They will be removed from the output as they are not supposed to be shown.
- Modifier emotes who are supposed to be hidden have a
modifier
property set totrue
. - Support to actually add a class to modified emotes is not planned.
- Note that there's nothing in place for the BTTV modifiers.
- Updated twurple to 6.0.9.
2.6.2: Maintenance release
This is a maintenance release.
We're now using Twurple 6 to access the Twitch API.
Other devDependencies were updated as well.
(Note about this GitHub repo: it's now detached from upstream and master
is the default branch again.)
Bellow a copy of the 2.6.0 release notes.
This release adds support for 7TV emotes.
It is also possible to pick between the WEBP and AVIF image formats during the fetching.
Example usage: fetcher.fetchSevenTVEmotes(44317909, 'avif');
(Note that the second parameter is optional and is webp
by default.)
Dependencies were also updated.
2.6.1: Fix crash with 7TV
Format might be missing and not properly set to the channel object.
(Note about this GitHub repo: it's now detached from upstream and master
is the default branch again.)
Bellow a copy of the 2.6.0 release notes.
This release adds support for 7TV emotes.
It is also possible to pick between the WEBP and AVIF image formats during the fetching.
Example usage: fetcher.fetchSevenTVEmotes(44317909, 'avif');
(Note that the second parameter is optional and is webp
by default.)
Dependencies were also updated.
2.6.0: Add support for 7TV emotes
This release adds support for 7TV emotes.
It is also possible to pick between the WEBP and AVIF image formats during the fetching.
Example usage: fetcher.fetchSevenTVEmotes(44317909, 'avif');
(Note that the second parameter is optional and is webp
by default.)
Dependencies were also updated.
2.5.0: Updated Twitch's CDN template
This release supports Twitch's new Emotes CDN URL template.
This new template can now return an image/gif
for animated emotes.
Dependecies were also updated.
2.4.1: Fixes typings from 2.4.0
This release (hopefully) fixes typings with the changes introduced in 2.4.0.
Bellow a copy of the 2.4.0 release notes.
BREAKING
This package now requires to pass a Twitch Client ID and a Client Secret to EmoteFetcher
before fetching Twitch emotes.
const clientId = '<your client id>';
const clientSecret = '<your client secret>';
const fetcher = new EmoteFetcher(clientId, clientSecret);
To create a Twitch app: https://dev.twitch.tv/console/apps/create
(Set the OAuth Redirect URLs to http://localhost
)
2.4.0: Twitch emotes now fetched via Twitch Helix API
BREAKING
This package now requires to pass a Twitch Client ID and a Client Secret to EmoteFetcher
before fetching Twitch emotes.
const clientId = '<your client id>';
const clientSecret = '<your client secret>';
const fetcher = new EmoteFetcher(clientId, clientSecret);
To create a Twitch app: https://dev.twitch.tv/console/apps/create
(Set the OAuth Redirect URLs to http://localhost
)
2.3.2: Dependencies upgrade and a minor fix
Minor update that might be best for TypeScript users.
- Bump
eslint
andjsdoc
devDeps. - .json() throws a TypeError (#12 - @Killusions)