BarryCarlyon / twitch_misc

Misc. Twitch bits and pieces
Do What The F*ck You Want To Public License
185 stars 46 forks source link

Add examples of raw IRC messages #22

Open oelna opened 3 years ago

oelna commented 3 years ago

I would love if this repo had a text file with example strings of all the different messages that can occur in Twitch IRC.

My Chatbot crashes often when it encounters an event/message it can't correctly parse and in order to make it better I have started feeding it test strings. But the Twitch docs are spotty and I believe you mentioned in some Forum post you test your bots in a similar manner.

It would help me (and potentially others?) a lot, if you could host a few examples of common IRC messages here.

Example: regular message

@badge-info=;badges=moderator/1;client-nonce=a488ded5d75c56dc4c63af2eda82e756;color=;display-name=selimhex;emotes=;flags=;id=2af047b8-0a89-42b8-809a-62c3fbfd0d46;mod=1;room-id=59039718;subscriber=0;tmi-sent-ts=1633092244622;turbo=0;user-id=501392856;user-type=mod :selimhex!selimhex@selimhex.tmi.twitch.tv PRIVMSG #oelna81 :können wir bitte endlich programmieren?

Example: Notice sent when tww2 gifted a subscription to Mr_Woodchuck in forstycup’s channel

@badge-info=;badges=staff/1,premium/1;color=#0000FF;display-name=TWW2;emotes=;id=e9176cd8-5e22-4684-ad40-ce53c2561c5e;login=tww2;mod=0;msg-id=subgift;msg-param-months=1;msg-param-recipient-display-name=Mr_Woodchuck;msg-param-recipient-id=89614178;msg-param-recipient-name=mr_woodchuck;msg-param-sub-plan-name=House\sof\sNyoro~n;msg-param-sub-plan=1000;room-id=19571752;subscriber=0;system-msg=TWW2\sgifted\sa\sTier\s1\ssub\sto\sMr_Woodchuck!;tmi-sent-ts=1521159445153;turbo=0;user-id=13405587;user-type=staff :tmi.twitch.tv USERNOTICE #forstycup
SorginDigitala commented 2 years ago

The docs includes examples: https://dev.twitch.tv/docs/irc/tags#tags-provided-by-the-server.

Channel info: @emote-only=0;followers-only=-1;r9k=0;rituals=0;room-id=130747120;slow=0;subs-only=0 :tmi.twitch.tv ROOMSTATE #seyacat Join: :justinfan29530!justinfan29530@justinfan29530.tmi.twitch.tv JOIN #seyacat leave: :justinfan29530!justinfan29530@justinfan29530.tmi.twitch.tv PART #seyacat raid to: :tmi.twitch.tv HOSTTARGET #seyacat :demiontus 4

message: @badge-info=subscriber/14;badges=moderator/1,subscriber/0;client-nonce=ef99b1d9f606cea809c1c4ec2989add4;color=#2E8B57;display-name=Presuntamente;emotes=;first-msg=0;flags=;id=e435cf16-7508-417f-a02e-1bb7fd067872;mod=1;room-id=194927077;subscriber=1;tmi-sent-ts=1638042827616;turbo=0;user-id=488234266;user-type=mod :presuntamente!presuntamente@presuntamente.tmi.twitch.tv PRIVMSG #seyacat :test

if contains "msg-id=raid" is a incoming raid. "emote-only=1" contains only emotes (no text). "bits=X" contains X bits. if contains "custom-reward-id" parameter is a reward, Rewards with no text message require PubSub