Skip to content

Releases: tmijs/tmi.js

tmi.js v1.8.5

18 Aug 21:08
Compare
Choose a tag to compare

v1.8.5

  • d9a3d63 Fix emoteset update timer not using sets.

tmi.js v1.8.4

13 Aug 20:59
Compare
Choose a tag to compare

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 option connection.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 option connection.agent. #209 #380 See this example on https-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();
  • a3343ec Fix for some channels returning empty mod/VIP lists, potentially because all accounts on the list are closed/banned. #480
  • b477c6a Upgrade dependencies. (Notable: ws v7.4.3 -> v8.0.0)
  • 697c9d6 Update NOTICE msg-ids for ban/timeout anon/mod.

tmi.js v1.8.3

20 Apr 00:18
Compare
Choose a tag to compare

v1.8.3

tmi.js v1.8.2

15 Apr 11:14
Compare
Choose a tag to compare

v1.8.2 [Deprecated]

  • 826e105 Remove async/await code from client._updateEmoteset. #463

v1.8.1

  • 28be1a7 Revert class and destructuring syntax.

tmi.js v1.8.0

13 Apr 14:46
Compare
Choose a tag to compare

v1.8.0

  • f9a5b3a The option connection.reconnect is now true 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 the emoticon_images API which can be a lot of data. The emotesets 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 the emoticon_images API will be recalled. Set to 0 or a negative number (or false) to disable the timer entirely.
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 use fetch/node-fetch, another request library, or a Twitch-specific library like twitch 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

06 Mar 15:35
Compare
Choose a tag to compare

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
});
  • #461 Fixed a rare issue when a tag that is to be IRC unescaped is not a string.
  • 989bdad Updated dependencies (package-lock)

tmi.js v1.7.2

25 Feb 11:18
Compare
Choose a tag to compare

v1.7.2

  • #456 Add Accept header to Kraken emoticon_images request.
  • #458 Assume connection success on MOTD end, not MOTD line.
  • e85809b Upgrade dependencies.

tmi.js v1.7.1

21 Dec 01:06
Compare
Choose a tag to compare

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

19 Dec 04:29
Compare
Choose a tag to compare

v1.7.0 b9cd4b6

  • e4a58a9 notice event now includes unknown notices msg-ids for future usage.
  • #402 If an action message (/me) includes bits, it will be emitted as a cheer event instead. The message-type now reflects if it's a chat or action 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 with node-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 affects client.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

12 Sep 10:03
Compare
Choose a tag to compare

v1.5.0

  • Add isReactNative utility function. #354 3557618
    This is used by client.api to know when to use XMLHttpRequest instead of JSONP.
const isReactNative = require('tmi.js/utils').isReactNative();
  • Fixed followersonly event when followers-only mode is enabled. #351 7e27d0c
client.on('followersonly', (channel, enabled, minutes) => {
    if(enabled) {
        console.log('Followers-only mode was enabled without throwing an error.');
    }
});