A Collection of Twitch Related Utilites for using Them with Your Favorite Bot

A Collection of Twitch Related Utilites for using Them with Your Favorite Bot

A collection of Twitch related utilites for using them with your favorite bot. Written in deno.

Twitch Utils Server

A collection of Twitch related utilites for using them with your favorite bot. Written in deno.

Install

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)

Usage

./run.sh.

Endpoints

/follows/:from/:to

Returns a string with the time a user is following a channel

URL Parameters
  • :from: user following a channel/another user
  • :to: channel/user to be queried against
Query Parameters
  • lang: Language code to return the response into (defaults to es)
Example:
> GET /follows/thespectralmachine/danielapirata?lang=en
< thespectralmachine follows the channel 8 months, 1 days, 20 hours, 16 minutes and 34 seconds ago
Command Example

Nightbot:

!addcom !followage $(urlfetch https://example.com/follows/$(querystring $(touser))/$(querystring $(channel)))

/channels/:channel/chatters/random

Returns a string with the name of a random chatter in a given channel

URL Parameters
  • :channel: channel to obtain a random chatter name from
Example:
> GET /channels/macheenhs/chatters/random
< thespectralmachine
Command Example

Nightbot:

!addcom !slap $(user) slaps $(urlfetch https://example.com/channels/macheenhs/chatters/random) in the face with a fish

/channels/:channel/emotes

Returns a (paginated) string with a list of BTTV and FF emotes available in a channel

URL Parameters
  • :channel: channel to obtain the emotes list from
Query Parameters
  • page: Page number. Defaults to 1
  • size: Max character size per page. Defaults to 500
Response Headers
  • X-Pages: Number of available pages
  • X-Page-Size: Max character size for each page
Example:
> GET /channels/topopablo11hs/emotes?page=1
< pepoS gachiBASS EZ FeelsRareMan pepeClap monkaShoot PepeHands ...
Command Example

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))

Download Details:

Author: Xpktro

Source Code: https://github.com/Xpktro/twitch-utils

deno nodejs node javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

AEM Querybuilder for JavaScript (Browser, Node, Deno)

Helix Querybuilder .AEM Querybuilder for JavaScript (Browser, Node, Deno)

NKeys for JavaScript - Node.js, Browsers, and Deno

A public-key signature system based on Ed25519 for the NATS ecosystem system for JavaScript. The nkeys.js library works in Deno, Node.js, and the browser!

Javascript module for easily generating mazes,compatible with both Deno and Node

A work-in-progress Javascript maze generator module, compatible with both Deno and Node.

Deno Tutorial for Beginners: Deno vs. Node: Better Than NodeJS?

Deno is released, it’s time to find out if it can prove a worthy competition for Node.js. What is Deno? Why Deno can be considered an alternative to Node? The main differences between Deno and Node. Write a simple Deno app.

What is Deno? The Node.JS Killer? The Deno-minator to Node?

What is Deno? The Node.JS Killer? The Deno-minator to Node? Deno is the new hype and will it be better than node.js? Deno is a secure runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language that addresses Node’s shortcomings