Releases: tmijs/tmi.js
Releases · tmijs/tmi.js
tmi.js v1.8.5
v1.8.5
- d9a3d63 Fix emoteset update timer not using sets.
tmi.js v1.8.4
v1.8.4
- 4a21293 Removed
union
from utils as it only had a single use in the library. These util functions shouldn't be used outside of the library but worth mentioning. - b44286d Allow passing an HTTP proxy agent instance to
node-fetch
(Node) at the optionconnection.fetchAgent
. Feedback on this is very welcomed, please open an issue if it doesn't work. - 643b2c9 Allow passing an HTTP proxy agent instance to
ws
(Node) at the optionconnection.agent
. #209 #380 See this example onhttps-proxy-agent
for more detail and available options. Feedback on this is very welcomed, please open an issue if it doesn't work.
const HttpsProxyAgent = require('https-proxy-agent');
const agent = new HttpsProxyAgent(proxyOptions);
const client = new tmi.Client({ connection: { agent } });
client.connect();
tmi.js v1.8.3
v1.8.3
- b9a9a70 Clear emotesets timer
tmi.js v1.8.2
tmi.js v1.8.0
v1.8.0
- f9a5b3a The option
connection.reconnect
is nowtrue
by default. - 43900a9 Added option
options.skipMembership
(false
by default) to not receive JOIN/PART messages for other users. This can reduce a lot of the spammy data that's getting blasted at the client.
const client = new tmi.Client({ options: { skipMembership: true } });
- c74c2bb
- Added option
options.skipUpdatingEmotesets
(false
by default) to skip calling theemoticon_images
API which can be a lot of data. Theemotesets
event will still be called but the second argument will just be an empty object. - Added option
options.updateEmotesetsTimer
(60000
(ms) by default) to change how often theemoticon_images
API will be recalled. Set to0
or a negative number (orfalse
) to disable the timer entirely.
- Added option
const client = new tmi.Client({ options: { skipUpdatingEmotesets: true, updateEmotesetsTimer: 0 } });
-
33c15c7 The Client has been converted to a class style.
-
ff341d2
Client.prototype.api
will now warn on use as it's deprecated and will be removed by the next minor version, 1.9.0. It's not intended to be a great choice for API requests. Either directly usefetch
/node-fetch
, another request library, or a Twitch-specific library liketwitch
on npm. -
76edfc8 dea8eed 5ea712f f689bc5 Remove various util functions.
-
8f3a849 Fixed possible case fallthrough bug.
-
efc6cdb Add eslint (and many more commits related to facelifting the repo)
v1.7.5
- 9d8ca1c Add "sub" alias for "subscription" event
tmi.js v1.7.3
v1.7.3
- 3e46332 Added the event "globaluserstate". See the Twitch docs on the tags for the GLOBALUSERSTATE IRC command. These tags have always been available via
client.globaluserstate
after the command but hasn't been emitted.
client.on('globaluserstate', tags => {
console.log('Hello, I am', tags['display-name']); // Hello, I am Alca
});
tmi.js v1.7.2
tmi.js v1.7.1
This update fixes the builds for v1.7.0. Those builds will be updated to be the same as these builds.
tmi.js v1.7.0
v1.7.0 b9cd4b6
- e4a58a9
notice
event now includes unknown noticesmsg-id
s for future usage. - #402 If an action message (/me) includes bits, it will be emitted as a
cheer
event instead. Themessage-type
now reflects if it's achat
oraction
message.
client.on('cheer', (channel, tags, message) => {
if(tags['message-type'] === 'action') console.log('Cheer message included /me');
});
- 7e6f9f2
raided
event viewers parameter is now parsed as a number and includes tags as the fourth parameter.
client.on('raided', (channel, username, viewers, tags) => {});
- dc9495e Set the join interval with
options.joinInterval
. This allows joining channels from the channels list much faster. Default is still 2000ms. As low as 300ms per Twitch rate limit. - #405 Option
connection.secure
is now enabled by default. #394 - 4783dba Replaced
request
package withnode-fetch
. This majorly reduces the dependency tree. - 1163a43 Use XHR instead of JSONP.
- dd5ece0 Added
options.globalDefaultChannel
to set the default global channel instead of the default#tmijs
. Only affectsclient.userstate
. This is used in case the "tmijs" Twitch channel disappears in the future. - 6059f30 Whispers now reject on
no_permission
NOTICE. - #435 Add
options.messagesLogLevel
to set the log level for chat messages, defaults to "info". - #442 Add
redeem
event. This event will only be received for rewards and custom rewards with user text.
client.on('redeem', (channel, username, rewardType, tags, message) => {
switch(rewardType) {
// Message that appears "highlighted" in the chat.
case 'highlighted-message': break;
// Message that skips the subscriber-only mode
case 'skip-subs-mode-message': break;
// Custom reward ID
case '27c8e486-a386-40cc-9a4b-dbb5cf01e439': break;
}
});
Fixes
- #378 Fixed warning: "possible EventEmitter memory leak detected".
- 98ce79f
invalid_user
msg-id now rejects command promises. - a626924 Fixed "global is not defined" in Angular. #369
- 1cea97c Internal calls to
connect
are now caught and sent to the logger. - #425 Fixed moderator tracking for USERSTATE messages.
- ffe4f48 Add missing VIP rejection
bad_vip_max_vips_reached
v1.6.0 ddced23
- #347 Use a function for
identity.password
in the configuration to use a dynamically generated token.
const client = new tmi.Client({
/* ... */
identity: {
username: 'alca',
async password() {
const user = await db.getUser({ userId: '7676884' });
const token = await getAccessToken(user.refresh_token);
return token;
}
}
});
tmi.js v1.5.0
v1.5.0
- Add
isReactNative
utility function. #354 3557618
This is used byclient.api
to know when to useXMLHttpRequest
instead ofJSONP
.
const isReactNative = require('tmi.js/utils').isReactNative();
client.on('followersonly', (channel, enabled, minutes) => {
if(enabled) {
console.log('Followers-only mode was enabled without throwing an error.');
}
});