Working with Emotes

Greetings! Just started writing my own Twitch tool two nights ago.

Got OAuth2 working and IRC Chat working.

Working on Emotes.

I can get MY user’s emotes via

https://api.twitch.tv/helix/chat/emotes?broadcaster_id=blah

I can get the Global emotes via

https://api.twitch.tv/helix/chat/emotes/global

Which has given me ability to show the emotes in 4x, 2x, and 1x views and animated GIF’s ect ect…

But I face some problems I’d like to solve and not quite seeing what I hope in the API docs.

1st problem

When I connect to an IRC room, Mine in this case, when other people join my stream, and use their emotes of all kinds from all places around, how do I get those emotes?

In the IRC chat I just see “:agoodjaredBwah” in this case … How do I translate that to an actual image file?

Which in this case I know the URL https://static-cdn.jtvnw.net/emoticons/v2/307791205/default/light/1.0

But I got that from the browser chat.

In the IRC chat, don’t know such things, none of that info carries over to IRC.

2nd Problem - For my Logged in user, mine in this case, is there A good way for me to get all the emotes for the streamers I follow and/or subscribe to and the others ? Not sure how I get “my” list of people I follow and/or subscribe to. As I assume, have to get their boradcaster_id each , then grab all the emotes lists one by one? If so, seems like a lot of work/traffic that could be reduce to one call.

3rd Problem Emote set names?
When I grab the global emotes, I don’t know what their group name is? So I can’t really cluster them together. The JSON does’nt tell me more than an ID number and Name. But not who/what they group under as ? I have TwitchHypeTrain, Hindsight2020Emotes, and a ton more… How do I know about these and get them too for my account? These are not coming over with what I am calling right now, and can’t really find in the doc how to know they exist to get them?

Sorry for the rambling. Been looking at the API docs for two days and getting dizzy. Not the greatest but no the worst i’ve dealt with before.

Example of over simplified IRC chat.

Here can see :agoodjaredBwah at the bottom of the chat text. This is the emote from another channel.
How would I get the image for this by that name?

emotelist

Emote list via website.
Hindsight2020Emotes
TwitchHypeTrain
Unlocked
HAHAHAlidays
and more…

How do I know about these to get them?

Enable the IRCv3 tags capability and emotes use in a message will be presented to you in the tags for a PRIVMSG

See the Guide: Getting Twitch Emotes | Twitch Developers

And the documented tags: Twitch IRC Tags | Twitch Developers for PRIVMSG

That would be EMOTESETS when you connect to chat from USERSTATE

There is no API support for EmoteSet to “name” or vice versa

Thanks on the IRC hint. Had not gotten to that part… and if did, might have skipped right over it.

Now that works, I got some work ahead of me to build the parsing out for this and do some more emote work :slight_smile:

Thanks!

Well so far I can get emote sets, from parsing the @badge-info tag from chat.

So far so good I think.

Twitch Chat / Emotes - Testing - YouTube

So far getting further!

Local caches image files on startup.

Got the IRC Chat working and I have it rendering the HTML to use my local images.

Even handles animated images!

Gotta refresh chat more often, right now only every 5 seconds but can go quicker. 5 seconds seems like forever when there isn’t much going on!

Got some tweaks to do and make options to show the 4x and 2x emote sizes.

Then I have to move to Badges / Bits images support… then add some customizable timers to be created and ran to auto post stuff the chat and fun stuff like that… nothing crazy.

Then move onto the other side where can use OBS to link to it for layers… That works already, via HTTP just I have a random picture showing for that part.

Maybe one day ill figure out what my full plan for this is… :slight_smile: