Skip to content
This repository has been archived by the owner on Aug 21, 2022. It is now read-only.
Samuel Alev edited this page Jun 16, 2021 · 6 revisions

Install Node.js

Use the Node.js installer to add node and npm (this may vary depending on the OS and distribution used).

Install Chrome

Chrome is required by the bot as it is bundled with all the required codec for most video formats.
You can download Chrome for Windows and macOS here.

Clone the repository

Clone the Watcher Bot repository using git (Git installer).

$ git clone https://github.com/SamuelAlev/watcher-bot.git

Install the Node.js dependencies.

$ npm install

Set the environment variables

Prerequisite

  • An unused email address and not blocked (Protonmail, Gmail, etc)
  • A Discord invitation link (https://discord.gg/....)

Assisted

Close your Discord instance (no discord.exe/discord should be running).
Run the helper script to set all required env variables.

$ npm run initialize

Manual

Copy and rename the file .env.template to .env.

Set Chrome binary

Windows (x64): C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe
Windows (x86): C:\\Program Files (x86))\\Google\\Chrome\\Application\\chrome.exe
macOS: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

You can now set:

  • CHROME_BIN: Binary used by Puppeteer

Setup a new account on Discord

Head to discord.com/register and create a new account for Watcher Bot.

You can now set:

  • DISCORD_MAIL_ADDRESS: Newly created user mail address
  • DISCORD_PASSWORD: Newly created user password

On the first login with the bot, you may need to accept the bot connection email and restart the bot.

Get the ID from a server or text/voice channel

You first need to enable the developer mode on Discord:

  1. Open up the Discord app
  2. Click on the settings cog in the bottom left corner
  3. Go to "Advanced" and toggle "Developer Mode"

To get the server ID, right-click on the server name in the dropdown on the top left and click "Copy ID".
To get the text/voice channel, right-click on the channel and click "Copy ID".

You can now set:

  • DISCORD_SERVER_ID: Server ID where the bot will connect.
  • DISCORD_BOT_COMMAND_CHANNEL_ID: Channel ID where the bot will watch for commands.
  • DISCORD_VOICE_CHANNEL_ID: Channel ID where the bot will connect to.

Create a webhook for your bot

The webhook is used by the bot to be able to send formatted Embed message.
To set up a webhook to be used by the bot:

  1. Open "Server Settings" by clicking the server name on the top left
  2. Go to "Integrations"
  3. Click "Create a new webhook"
  4. Enter the name you want the bot to have
  5. Choose the text channel where the messages from the bot will be posted
  6. Click "Copy Webhook Url"

You can now set:

  • DISCORD_WEBHOOK_URL: Webhook used by the bot to write messages.

Run Watcher Bot

Using npm start the Watcher Bot process.

$ npm start

Wait for the message "Ready to receive messages".