[CustomAPI] List channel bttv emotes

This is a fairly simple one. It returns all the channel and shared emotes on your channel. It’s useful if you’d like to list the emotes available on the channel, but don’t want to update the command every time you change your shared emotes.

The api link is:
https://twitch.center/customapi/bttvemotes?channel=CHANNEL

Example usage:
!commands add !bttvemotes $(urlfetch https://twitch.center/customapi/bttvemotes?channel=$(channel))

There’s an optional separator argument you can add to specify the separator between emotes. For example &separator=+-+ would return something like so (note that + is space here in URL encoding):

emote1 - emote2 - emote3

Results are cached, so there won’t be instant update as you change emotes.
If there’s enough demand, I could also potentially make one for Twitch sub emotes, although those change less often. Still useful to have a command and not worry about it getting outdated.

1 Like

Whenever i try to add this command i get this response: Error Connecting To Remote Server

You may be putting the wrong url because my servers working properly.

Try pasting us the command you’re using.

Hi,
same error for me, it is working in browser:

but as nightbot command it never worked for me:

regards Anti

Err, my bad. For the time being, use the http link instead of https

ahhh, that works :slight_smile:

Sorry for bumping 3 year old thread. Can you fix this to handle when emotes total more than 400 characters?

I actually noticed this myself the other day. Not sure if I can split it into two messages, but at the very least I can try trimming it.

Does anyone with nightbot-fu know this:
I know using urlfetch json bypasses the 400 limit,
so if I allow the API to return a json, and then change the command to concat the results using eval, would that work?

I dont think that will work, the final output has to be less than 400 characters. An other work around might be to respond with the first part (< 400) emotes and if there’s more emotes left, try using the Nightbot-Response-Url in the request header to post the second message?

That’s awesome, thank you xg. Updated api to send overflow through /channel/send. Works perfectly (although the request one arrives before the other, I might just swap the two). Those headers are def very useful.

Try it out @lehrules let me know if it works for you.

Yeah those headers do come in handy, glad that worked!

Where in the variable/command URL thing do I put the seperator( &separator=+-+)?

just at the end of the url
!commands add !bttvemotes $(urlfetch https://twitch.center/customapi/bttvemotes?channel=$(channel)&separator=+-+)

Hello,

Thank you for this! I’ve been looking for a way to create this command on nightbot and this exactly what I needed. However, I was wondering if it’s possible to have something like this for FrankerFaceZ emotes as well…? or does this only work with BTTV emotes?

Thanks!

Enjoy: https://twitch.center/customapi/ffzemotes?channel=lirik

omg thank you so much!

youre the best dude.