tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.55k stars 214 forks source link

Undocumented NOTICE messages #28

Closed AlcaDesign closed 9 years ago

AlcaDesign commented 9 years ago

ban_success

Upon banning someone:

@msg-id=ban_success :tmi.twitch.tv NOTICE #channel :username is now banned from this room.

unban_success

Unbanning:

@msg-id=unban_success :tmi.twitch.tv NOTICE #channel :username is no longer banned from this room.

bad_unban_no_ban

Unbanning when not banned:

@msg-id=bad_unban_no_ban :tmi.twitch.tv NOTICE #channel :username is not banned from this room.

timeout_success

Timing-out:

@msg-id=timeout_success :tmi.twitch.tv NOTICE #channel :username has been timed out for length seconds.

bad_commercial_error

Attempting to run a commercial when offline:

@msg-id=bad_commercial_error :tmi.twitch.tv NOTICE #channel :Failed to start commercial.

(I'll try to get an example when the channel is online when I can)


I suggest this being a recommended thread for posting undocumented notice messages. :+1:

Schmoopiie commented 9 years ago

Thank you, will update the documentation when I bump the version to 0.0.20.

Edit: It is okay for the username, I am not returning any params but the channel, the msg-id and the message itself because we cannot predict where is the username in the message. As far as I know, the purpose of this new "notice" system is to display the message in different languages based on the user settings. The only thing that will never change is the msg-id.

Thanks!

AlcaDesign commented 9 years ago

already_subs_off

Attempting to turn subscribers-mode off:

@msg-id=already_subs_off :tmi.twitch.tv NOTICE #channel :This room is not in subscribers-only mode.

usage_slow_on

The slow command with a number less than 1 or a word:

@msg-id=usage_slow_on :tmi.twitch.tv NOTICE #channel :Usage: "/slow [duration]" - Enables slow mode (limit how often users may send messages). Duration (optional, default=120) must be a positive number of seconds. Use "slowoff" to disable.

usage_slow_off

The slowoff command with something after it:

@msg-id=usage_slow_off :tmi.twitch.tv NOTICE #channel :Usage: "/slowoff" - Disables slow mode.

usage_subs_on

The subscribers command with something after it:

@msg-id=usage_subs_on :tmi.twitch.tv NOTICE #channel :Usage: "/subscribers" - Enables subscribers-only mode (only subscribers may chat in this channel). Use "subscribersoff" to disable.

usage_subs_off

The subscribersoff command with something after it:

@msg-id=usage_subs_off :tmi.twitch.tv NOTICE #channel :Usage: "/subscribersoff" - Disables subscribers-only mode.

usage_clear

The clear command with something after it:

@msg-id=usage_clear :tmi.twitch.tv NOTICE #channel :Usage: "/clear" - Clear chat history for all users in this room.

usage_r9k_on

The r9kbeta command with something after it:

@msg-id=usage_r9k_on :tmi.twitch.tv NOTICE #channel :Usage: "/r9kbeta" - Enables r9k mode. See http://bit.ly/bGtBDf for details. Use "r9kbetaoff" to disable.

usage_r9k_off

The r9kbetaoff command with something after it:

@msg-id=usage_r9k_off :tmi.twitch.tv NOTICE #channel :Usage: "/r9kb etaoff" - Disables r9k mode.

usage_commercial

The commercial command with invalid text after it:

@msg-id=usage_commercial :tmi.twitch.tv NOTICE #channel :Usage: "/commercial [length]" - Triggers a commercial. Length (optional) must be a positive number of seconds.

usage_host

The host command with nothing after it:

[08:12pm] warn: @msg-id=usage_host :tmi.twitch.tv NOTICE #channel :Usage: "/host " - Host another channel. Use "unhost" to unset host mode.

usage_unhost

The unhost command with something after it:

@msg-id=usage_unhost :tmi.twitch.tv NOTICE #channel :Usage: "/unhost" - Stop hosting another channel.

usage_mod

The mod command with nothing after it:

@msg-id=usage_mod :tmi.twitch.tv NOTICE #channel :Usage: "/mod " - Grant mod status to a user. Use "mods" to list the moderators of this room.

usage_unmod

The unmod command with nothing after it:

@msg-id=usage_unmod :tmi.twitch.tv NOTICE #channel :Usage: "/unmod " - Revoke mod status from a user. Use "mods" to list the moderators of this room.

usage_timeout

The timeout command with anything after:

@msg-id=usage_timeout :tmi.twitch.tv NOTICE #channel :Usage: "/timeout [duration]" - Temporarily prevent a user from chatting. Duration (optional, default=600, max=1209600) must be a positive number of seconds. Use "unban" to remove a timeout.

usage_ban

The ban command with anything after:

@msg-id=usage_ban :tmi.twitch.tv NOTICE #channel :Usage: "/ban " - Permanently prevent a user from chatting. Use "unban" to remove a ban.

usage_unban

The unban command with anything after:

@msg-id=usage_unban :tmi.twitch.tv NOTICE #channel :Usage: "/unban " - Removes a ban on a user.

Schmoopiie commented 9 years ago

Wow, nice! :smile:

Thanks!

AlcaDesign commented 9 years ago

Still have to get the successful commercial one, .. Might get it in a minute

AlcaDesign commented 9 years ago

commercial_success

Commercial command:

@msg-id=commercial_success :tmi.twitch.tv NOTICE #channel :Initiating 30 second commercial break. Please keep in mind that your stream is still live and not everyone will get a commercial!

Schmoopiie commented 9 years ago

Awesome! :smile:

AlcaDesign commented 9 years ago

Errored login:

:tmi.twitch.tv NOTICE * :Error logging in

Should add to https://github.com/Schmoopiie/tmi.js/blob/master/lib/client.js#L279

megadrive commented 9 years ago

Got a new one today when writing a feature that bans any links posted in chat. My bot tried to timeout itself obviously. :+1:

Could not parse NOTICE from tmi.twitch.tv: @msg-id=bad_timeout_self :tmi.twitch.tv NOTICE #channel :You cannot timeout yourself.

AlcaDesign commented 9 years ago

bad_ban_broadcaster

Attempting to ban the broadcaster:

@msg-id=bad_ban_broadcaster :tmi.twitch.tv NOTICE #channel :You cannot ban the broadcaster.

bad_ban_self

Attempting to ban self when not the broadcaster:

@msg-id=bad_ban_self :tmi.twitch.tv NOTICE #channel :You cannot ban yourself.

bad_mod_banned

Attempting to mod someone who is banned:

@msg-id=bad_mod_banned :tmi.twitch.tv NOTICE #channel :username is banned in this room. You must unban this user before granting mod status.

AlcaDesign commented 9 years ago

cmds_available

The help command:

@msg-id=cmds_available :tmi.twitch.tv NOTICE #channel :Commands available to you in this room (use /help for details): /help /w /me /disconnect /mods /color /ban /unban /clear /timeout /subscribers /subscribersoff /slow /slowoff /r9kbeta /r9kbetaoff /host /unhost

usage_help

The help command followed by "help":

@msg-id=usage_help :tmi.twitch.tv NOTICE #channel :Usage: "/help" - Lists the commands available to you in this room.

no_help

The help command followed by "w" (whisper): (assume that /w will get a help message at some point and that no_help can apply elsewhere.)

@msg-id=no_help :tmi.twitch.tv NOTICE #channel :No help available.

usage_me

The help command followed by "me":

@msg-id=usage_me :tmi.twitch.tv NOTICE #channel :Usage: "/me " - Send an "emote" message in the third person.

usage_disconnect

The help command followed by "disconnect":

@msg-id=usage_disconnect :tmi.twitch.tv NOTICE #channel :Usage: "/disconnect" - Reconnects to chat.

usage_mods

The help command followed by "mods":

@msg-id=usage_mods :tmi.twitch.tv NOTICE #channel :Usage: "/mods" - Lists the moderators of this channel.

Schmoopiie commented 9 years ago

Thanks guys! :+1:

AlcaDesign commented 9 years ago

whisper_restricted_recipient

Attempting to whisper a user who has "Block Whispers from Strangers" on. (Block whispers from people you don't follow)

@msg-id=whisper_restricted_recipient :tmi.twitch.tv NOTICE #jtv :That user's settings prevent them from receiving this whisper.

This is pretty important for detecting if a user can receive whispers with their current settings.

Schmoopiie commented 9 years ago

Alright, thanks! :+1:

zoton2 commented 9 years ago

bad_timeout_staff

Attempting to timeout a staff member.

@msg-id=bad_timeout_staff :tmi.twitch.tv NOTICE #channel :You cannot timeout staff username. Please email support@twitch.tv if a staff member is being abusive.

bad_ban_staff

Attempting to ban a staff member.

@msg-id=bad_ban_staff :tmi.twitch.tv NOTICE #channel :You cannot ban staff username. Please email support@twitch.tv if a staff member is being abusive.

bad_timeout_admin

Attempting to timeout an admin.

@msg-id=bad_timeout_admin :tmi.twitch.tv NOTICE #channel :You cannot timeout admin username. Please email support@twitch.tv if an admin is being abusive.

bad_ban_admin

Attempting to ban an admin.

@msg-id=bad_ban_admin :tmi.twitch.tv NOTICE #channel :You cannot ban admin username. Please email support@twitch.tv if an admin is being abusive.

bad_timeout_global_mod

Attempting to timeout a global moderator.

@msg-id=bad_timeout_global_mod :tmi.twitch.tv NOTICE #channel :You cannot timeout global moderator username. Please email support@twitch.tv if a global moderator is being abusive.

bad_ban_global_mod

Attempting to ban a global moderator.

@msg-id=bad_ban_global_mod :tmi.twitch.tv NOTICE #channel :You cannot ban global moderator username. Please email support@twitch.tv if a global moderator is being abusive.

(While doing these I actually got an error logging in at one point and had to make a new OAuth; don't know if this was coincidental or not!)

Schmoopiie commented 9 years ago

Thank you @zoton2 :smile:

AlcaDesign commented 9 years ago

msg_verified_email

From @Egonny: "This notice occurs when the user needs an e-mail address before he can submit chat messages."

@msg-id=msg_verified_email :tmi.twitch.tv NOTICE #channel :This room requires a verified email address to chat. Please verify your email at http://www.twitch.tv/settings

msg_ratelimit

From @smalls89: Send messages too fast:

@msg-id=msg_ratelimit :tmi.twitch.tv NOTICE #channel :Your message was not sent because you are sending messages too quickly.

bad_timeout_broadcaster

Attempt to timeout the broadcaster

EfficiencyVI commented 9 years ago

Felt over one more. ;-)

@msg-id=hosts_remaining :tmi.twitch.tv NOTICE #efficiencyvi :2 host commands remaining this half hour.

Schmoopiie commented 9 years ago

Thank you, also added host_target_went_offline :smile: