Code Monkey home page Code Monkey logo

zsrstreams's Introduction

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

zsrstreams's People

Contributors

trezc0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.