A collection of Twitch related utilites for using them with your favorite bot. Written in deno.
You require Deno (as of now using 1.4.6).
You also need to get a Twitch App ID and Secret (put them in .env
)
./run.sh
.
Returns a string with the time a user is following a channel
:from
: user following a channel/another user:to
: channel/user to be queried against
lang
: Language code to return the response into (defaults toes
)
> GET /follows/thespectralmachine/danielapirata?lang=en
< thespectralmachine follows the channel 8 months, 1 days, 20 hours, 16 minutes and 34 seconds ago
Nightbot:
!addcom !followage $(urlfetch https://example.com/follows/$(querystring $(touser))/$(querystring $(channel)))
Returns a string with the name of a random chatter in a given channel
:channel
: channel to obtain a random chatter name from
> GET /channels/macheenhs/chatters/random
< thespectralmachine
Nightbot:
!addcom !slap $(user) slaps $(urlfetch https://example.com/channels/macheenhs/chatters/random) in the face with a fish
Returns a (paginated) string with a list of BTTV and FF emotes available in a channel
:channel
: channel to obtain the emotes list from
page
: Page number. Defaults to1
size
: Max character size per page. Defaults to500
X-Pages
: Number of available pagesX-Page-Size
: Max character size for each page
> GET /channels/topopablo11hs/emotes?page=1
< pepoS gachiBASS EZ FeelsRareMan pepeClap monkaShoot PepeHands ...
Nightbot:
!addcom !emotes $(urlfetch https://example.com/channels/$(querystring $(channel))/emotes?page=$(query))
Phantombot:
!addcom !emotes (customapi https://example.com/channels/(channelname)/emotes?page=(echo))