cletusc / Userscript--Twitch-Chat-Emotes

Adds a button to Twitch that allows you to "click-to-insert" an emote.
http://cletusc.github.io/Userscript--Twitch-Chat-Emotes/
MIT License
36 stars 20 forks source link

Emotes not sorting by streamer #75

Closed matthewjk123 closed 9 years ago

matthewjk123 commented 9 years ago

Hello. I am a Partnered Streamer on Twitch, and I have a sub button. Me and Night are friends and he did me the favor of adding two emotes into BTTV for me. These emotes for some reason are not showing under my section in your addon, they are showing in the "All Emotes" section, (screenshot: http://i.imgur.com/kbaP6Io.png). This is where they should be, (screenshot: http://i.imgur.com/6QkXijz.png). If you could look into this, that would be great. Also, I would like to let you know that all of the BTTV emotes are also in the "All Emotes" section, when they should have their own.

Thanks, Matthewjk

cletusc commented 9 years ago

Emotes added by 3rd parties, e.g. BTTV, must have a channel specified for the emote in order for it to group. Although not documented formally, I linked @night to some documentation when I added the API.

As shown on BTTV's emotes pulled from their server, they aren't specifying the channel:

{
    status : 200,
    emotes :
    [
        0 :
        {
            url : "//cdn.betterttv.net/emotes/trollface.png",
            width : 23,
            height : 19,
            regex : ":tf:"
            // NEED CHANNEL HERE!
        },
        // ...
    ]
}

Channel is also not added in the method they use with my API.

There is an issue that Night made me aware of, and that's a group showing up twice, but is not related to this.

Not my issue--closing.

night commented 9 years ago

While I added channel labels, this did not use to be an issue as the emotes contained emoticon_set. What changed to break that?

cletusc commented 9 years ago

I've never used the emoteset to sort or group, only to see if it can be used. There has always been a need for channel ever since I started grouping (many many versions ago). How an emote has been appended to the menu has been the same since at least Oct 2014 and even then, I've always checked the channel. The only thing I need now is emote.url, emote.channel, and emote.text. If you don't provide emote.channel, it gets thrown in the globals section.

The behavior with how emotes are appended, and how they are parsed, is in the process of being reworked and documented fully, both to be more rugged, and to easier to understand code-wise. I'll be adding console warnings on things you should be adding, like emote.channel.