Enteligenz / StardewMods

Collection of my Stardew Valley mods.
MIT License
1 stars 1 forks source link

Adding support for USERNOTICE? #8

Closed SocksTheWolf closed 3 months ago

SocksTheWolf commented 3 months ago

It might be handy to add USERNOTICE support so you can get alerted when someone subscribes/raids a channel.

https://dev.twitch.tv/docs/irc/commands/#usernotice

Would need to implement tag parsing to some degree. Anything to make this game more accessible for streamers.

Enteligenz commented 3 months ago

Tag Parsing? Did the messages we receive from Twitch have some sort of tagging, or do you mean getting the tags from the message text itself?

SocksTheWolf commented 3 months ago

Tag Parsing? Did the messages we receive from Twitch have some sort of tagging, or do you mean getting the tags from the message text itself?

I believe it's located in the first portion of the space separated message. I'm not too sure how to get to it tbh. Perhaps have to tell the twitch server that we can support tag embedded messages?

SocksTheWolf commented 3 months ago

We have to request tag support via:

CAP REQ :twitch.tv/commands twitch.tv/tags

Enteligenz commented 3 months ago

Huh, I guess Twitch offers a surprising amount of info, if one just knows where to look

SocksTheWolf commented 3 months ago

They also have an example parser in js (which could be converted to C#) here https://dev.twitch.tv/docs/irc/example-parser/

SocksTheWolf commented 3 months ago

I went ahead and added tag requesting support and modified the offsets for finding the message/username/channel.

Would just need to add the USERNOTICE handling.

Should I open a pull request for just the tag stuff? I don't know if I'm going to add USERNOTICE unless I do it on stream today.

Enteligenz commented 3 months ago

Your call :) I'm not sure when I can find time to look at it myself anyway, been a while since I've touched anything Twitch-related, so there's no rush. And sorry about not having a lot of time for this rn, I feel like I'm letting you handle all this on your own :s

SocksTheWolf commented 3 months ago

No worries, I like working on accessibility stuff for streamers, and having everything in one window is really handy.