Giter Club home page Giter Club logo

discordtwitchannouncer's Introduction

DiscordTwitchAnnouncer

Announces when Twitch channels go live, in Discord

Announcement

New DTA rework coming soon, in ESM and with SQLite support! Please check the dev branch for updates.

Breaking changes in 4.0.0 & 5.0.0

  • 5.0.0: Presence settings reworked. Check out the new settings.cjs file for the new configuration.
  • 5.0.0: settings.js file renamed to settings.cjs
  • 4.0.0: Bot now uses discord.js v14.
  • 4.0.0: Prefix commands have been removed, you must now mention the bot to use it.
  • 4.0.0: Presence settings no longer work.

5 Step Setup

  1. Get NodeJS, v16.x.x or newer (Tested & Works on 16.14.2).
  2. Git clone or download this repository and then change to the directory in your console/terminal.
  3. Type npm install in your console/terminal and wait for dependencies to download and install successfully.
  4. Open up settings.cjs with any text program:
const { ActivityType, PresenceUpdateStatus } = require("discord.js");

module.exports = {
  timer: 61000, // Is in milliseconds. Default: 61000 ms = 1 minute & 1 second. Lower values may not work out well.
  cooldownTimer: 21600000, // Is in milliseconds. Default: 21600000 ms = 6 hours.
  language: 'english', // Default language 'english'. Other languages available in `i18n` folder.
  twitch: {
    clientID: '', // Make a Twitch application at
    clientSecret: '' // https://dev.twitch.tv/console/apps
  },
  discord: {
    token: '', // https://discordapp.com/developers/applications/me/
    permissionForCommands: BigInt('0x0000000010000000'), // https://discordapp.com/developers/docs/topics/permissions
    message: '@everyone', // The default text on announcement, before the url and stream type. Can be changed with !message command. Default: '@everyone' = '@everyone LIVE! https://twitch.tv/stream'
    activity: {
      activities: [{
        name: 'TWITCH API',
        type: ActivityType.Watching, // .Listening, .Competing, .Playing, .Streaming, .Watching
      }],
      status: PresenceUpdateStatus.Online, // .Online, .Idle, .Invisible, .DoNotDisturb, .Offline
    },
  },
  log: true // Logs changes done to data.json into logs.txt.
}
  1. Change the fields accordingly. (Fields twitch.clientID, twitch.clientSecret & discord.token must have a value, otherwise program will error.)

Type node app.js in your console/terminal to run program.

After you've started the announcer, invite the bot and go to your discord channel.

Commands

Available commands, prefix them with a mention to the bot, e.g. @DTA help:

  • help
  • uptime
  • streamers
  • (Example) timezone sv-SE Europe/Stockholm Check IANA BCP 47 Subtag registry & IETF RFC 5646 for locale tags and IANA Time Zone Database or Wikipedia for timezones.
  • (Example) channel #general
    • (Example) channel 000000000000000000
  • (Example) operator @User_Name
  • (Example) add Streamer_Name
  • (Example) remove Streamer_Name
  • (Example) reaction ๐Ÿ‘
  • (Example) message <streamerName> @here %name% is **%status%** streaming, **%game%**: *%title%* %link%
    • %name% Streamer's name
    • %status% VOD / LIVE / RERUN?
    • %game% Game name
    • %title% Stream title
    • %link% Twitch link
  • (Example) language english Check i18n folder for available languages.
  • (Example) announcementchannel Streamer_Name 000000000000000000

Contributing

Fork project & Send a pull request. Use standard lint, thanks.

License MIT

discordtwitchannouncer's People

Contributors

dependabot[bot] avatar kararty avatar sametkecici 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.