Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

TreZc0/zsrstreams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Bot for Multigame Speedrun TTV-stream announcements

powered by ZeldaSpeedRuns

Based on Simple Twitch Streams Discord Bot

A basic discord bot that tracks twitch streams for a list of games, and posts messages to discord when twitch streams go live.

Note: It only posts to one discord server and one channel.

How to set up:

Prerequisites

Step 1

Rename the config.json.example file to config.json and edit the settings in the file.

To get the channel ID of a channel in your discord server, turn on developer mode in your discord user settings (under "Appearance"). You can then get the channel ID by right-clicking a channel and selecting "Copy ID".

To create a Twitch development app for the Client-ID and Client-Secret go to the Twitch Developers website

To create a Discord Bot / Application and get a bot token, check out the Discord Developer Portal

To get the bot running, you will need a Twitch OAuth Refresh Token. To receive one, run through the OAuth Authorization Code Flow - at the end of the process, you will have an Access Token and a Refresh Token.

To get a list of games you want to track, grab the id and boxArt off the Twitch API Games Endpoint An entry for the games object needs to have the following format:

{
  "twitchGameID": { "name": "Name of your Choice / Gamename", "boxArt": "twitchBoxArtImageLink" }
}

The tags array includes Twitch streaming tags that should be included in your search. Per default, "Speedrun", "Randomizer", and "TAS" are tracked. For more or different tags check the Full API Tags list.

Step 2

Install the node.js dependencies:

npm i

Step 3

Run the bot:

node index.js

To run it permanently, use a process manager like PM2

Releases

No releases published

Packages

No packages published