Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Black Widow Company

Twitch Discord Webhook

A simple node.js application that monitors BWC Members' Twitch channels for new streams and posts them to a Discord channel using a webhook.

Requirements

Installation

Run in terminal

  1. Download the latest release from the releases page.
  2. Extract the zip file to a directory of your choice.
  3. Open a terminal window and navigate to the directory where you extracted the zip file.
  4. Run npm install to install the required dependencies.
  5. Run npm run start to start the application.
  6. The application will now be running in the terminal window. You can close the terminal window if you wish.
  7. To stop the application, press CTRL + C in the terminal window.

Run as a service

  1. Download the latest release from the releases page.
  2. Extract the zip file to a directory of your choice.
  3. Open a terminal window and navigate to the directory where you extracted the zip file.
  4. Run npm install to install the required dependencies.
  5. Run pm2 start ecosystem.config.json to start the application as a service. You can then use pm2 stop <name>/<id> to stop the application, and pm2 restart name>/<id> to restart the application.
  6. If you wish to run the application as a service on startup, you can use PM2 to do so. Run pm2 startup to generate the startup command for your system. Then run the command that was generated to enable PM2 to run on startup. Then run pm2 save to save the current PM2 configuration. You can then use pm2 stop name>/<id> to stop the application, and pm2 restart name>/<id> to restart the application.

Configuration

config.json

  1. Open the config.json file in a text editor.
  2. Replace the message value with the message you want to be sent to the Discord channel.
  3. Add the members channel id to the Streamers array.
  4. Save the config.json file.

ecosystem.config.json

  1. Open the ecosystem.config.json file in a text editor.
  2. Replace the CLIENT_ID value with your Twitch API Client ID.
  3. Replace the CLIENT_SECRET value with your Twitch API Client Secret.
  4. Replace the WEBHOOK_URL value with the webhook url for your Discord channel.
  5. Save the ecosystem.config.json file.

Notes

  • The message value supports Discord markdown.
  • You can find the members' usernames by going to their Twitch channel and copying the last part of the URL. For example, the username for https://www.twitch.tv/bradleyw is bradleyw.

Logging

The application uses the winston logger to log messages to the console and to a log file. The log file is named Youtube-API-Discord.log.

Contributing

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Make your changes.
  4. Create a pull request.
  5. Enjoy!

Contact

If you have any questions, feel free to contact me at:

Credits

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages