Closed mahony0 closed 5 years ago
Also if we solve this issue, I can send PR for getting Partner status check for the message user.
Hello I need to check this from documentation and make some tests I will come back here when i have a update Thanks
Prototype for PRIVMSG: https://dev.twitch.tv/docs/irc/tags/#privmsg-twitch-tags
Ok, i not have time to test now, can you test by removing the arobase ? "@badges=" change to "badges=" ?
Yes, I already change that part in my own library because can't get badge details while code is like @badge=
As I saw on the API document, PRIVMSG is starting with @badge-info=
Ok, with badge-info what type of more details you get ? It's important for a bot ? Thanks
the tag list begin with an @ and end with the tag "user-type" which is the message author and can be treated differently, all the stuff listed between those spots should be considered useful information, you can find the badges, the color of the display name, if the user is using turbo, if the user is a mod and much more
I think my issue misunderstood. I proposed to change @badges= with badges= for catching VIP status at first. @badge-info is currently only has subscriber value, a total month of subscription of user which is also an important value IMHO. It's up to you. If you think that props are valuable, I can send PR for that.
oh no. It's just that I forget the point of my message before getting to it 😅 And I assumed that the tags were parsed as automatically as possible, just get the tag's name and its value. If it's an array parse it as such and throw all of this in an array to be accessible by whatever use the lib. It's how we did it in the python IRC client. This way you will still parse all the tags aven if twitch decides to add a bunch more without noticing anyone (as they usually do 😄) and you don't have anything to do to maintain the lib when it occurs.
In us case the only need is to catch badge without extra information like version... For the moment in all modules and the core the only checked badge is VIP, other roles is catch elsewhere. @mahony0 Yeah please make a PR for basic fix for the moment ;) Thanks for your work
I created PR with #13 In future releases, as @Ragnar-Oock noted, we should parse all PRIVMSG and other Twitch Tags parameters in IrcConnect Class for using them easily in modules.
I think create a User object that contain all for these informations. Modules get Message object containing User object.
I need some refactor to do this, but plan this in future.
Follow this card in project board: https://github.com/MyTheValentinus/twitch-bot/projects/1#card-26300419
On PRIVMSG prototype, it shows parameters like @badge-info=; and badges=; but on this line: https://github.com/MyTheValentinus/twitch-bot/blob/6fe8f40813d4d27e3ab432d1cb313249cbcd7111/src/class/IrcConnect.php#L234 VIP user check handled with: @badges= I haven't tested it yet but it seems this will never catch VIP status either.
I can send PR if you can approve this issue.
Same table also has shown subscriber, turbo and user-type parameters Deprecated and will be send in badges parameter in future, so badges parameter will be very handful for all of this values and probably we need to change in near future.