Releases: tmijs/tmi.js
Releases · tmijs/tmi.js
tmi.js v1.4.5
v1.4.5
- Added the event
"automod"
for the"msg_rejected"
and"msg_rejected_mandatory"
msg-id
's. #273Theclient.on("automod", (channel, msgID, message) => {});
msgID
of"msg_rejected"
means the message was caught by Automod but may still be accepted by a human."msg_rejected_mandatory"
means the message was automatically rejected due to moderation settings.
v1.4.4
- The client's connection must now be
OPEN
instead of notCLOSING
and notCLOSED
. #338 - Trying to send a message while not authorized (using an anonymous identity) will reject with
"Cannot send anonymous messages."
but still rejecting with"Not connected to server."
for disconnected clients.const client = new tmi.Client(); client.say("twitch", "Hello world.") .catch(console.error); // Logs "Not connected to server." client.connect() .then(() => client.say("twitch", "Hello world.")) .catch(console.error); // Logs "Cannot send anonymous messages."
- Altered the auto-joiner for the
channels
option to use the.join
method instead of directly sending a raw message. Errors are sent to the logger.
tmi.js v1.4.3
- Parse the
badge-info
tag likebadges
. This offers some information about certain badges in thebadges
tag.- This means that the user has the 12-month subscriber badge but more specifically have subscribed for 21 months:
{ "badge-info": { subscriber: "21" }, badges: { subscriber: "12" } }
- Automatically unescapes strings in the tags. This replaces
"\\s"
,"\\:"
,"\\n"
, and"\\r"
with" "
,";"
,""
(empty), and""
(empty) respectively."Channel\\sSubscription\\s(Schmoopiie)" // Input "Channel Subscription (Schmoopiie)" // Output
- Added the event "primepaidupgrade". Fires when a user converts from a Prime subscription to a regular subscription. Their subscription will continue after the Prime subscription ends.
client.on("primepaidupgrade", (channel, username, methods, userstate) => {});
- Removed
extra-utils
from the library. This wasn't documented nor recommended and would be better supplied by userland anyway. - Fixed a case when joining a channel that no longer exists would cause the
.join()
command's callbacks to register incorrectly. (#342)