Coder Social home page Coder Social logo

twitchcord-old's Introduction

twitchcord

Twitch stream notifications on Discord in (usually) less than 60 seconds

This version of twitchcord is now deprecated.

Check Here for a version that uses the new twitch API

Originally made by myself for Jeremy Dooley's Twitch/Discord Community, this handy little node script will check any streams specified once per minute and send a webhook to Discord if they're live.

alt text


Setup:

  • First you're going to need to Make a New Twitch Application
    • Give it a clever name
    • Set the Redirect URI to http://localhost
    • Accept the terms
  • Copy the Client ID from you new Twitch Application and set twitchAuth.clientID to it in config.json (Paste it at Line 3, Column 18)
    • Save config.json
  • Run npm i

Your App is now (technically) functional!

Configuration:

I'd like to think the config.json is fairly straightforward...

  • Each object in streams is a different streamer that the script will check
    • id is the Unique Account ID of the twitch streamer (You can get this from TwitchTools)
    • nickname is only used internally, but makes it easier for you to distinguish which stream is which
    • latestStream is the variable modified by the program to make sure it only sends out one round of notifications per stream
    • receivers is an array of sub-objects for each notification you want to send out.
      • nickname Again, only used internally; the nickname for this server/channel/webhook link you're sending out
      • customMessage is the message sent above the embed. If you want to ping everyone, or a certain group of users, this is where you can put that.
      • webhook is the actual webhook URL that you get from Discord

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.