Skip to content

A voice announcer that announces when users enter or leave a voice channel on Discord

Notifications You must be signed in to change notification settings

justin-guan/discord-announcer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-announcer

This repo is no longer being maintained. I wanted to rewrite this bot in Typescript so that it would be easier to maintain. A rewritten and updated version of this bot can be found here. I highly encourage everyone to check out that project instead as it's much more up to date than this one.

This is a node.js bot for discord that announces when a user enters or leaves a voice channel. This bot works using the Voice RSS API to generate announcements. As of v2.0.0, this bot has multi server support.

Requirements

Please use Node v8.0.0 or higher. This bot uses features that are only available in Node v8.0.0 and up. See the Nodejs website for more details on Node.js installation.

In order to host this bot, you must also set up a discord bot. Additionally, a VoiceRSS API key is required in order to do voice announcements.

Setting up Discord

  1. First go to Discord's Application Management page to create a new application. Simply select "New Application".
  2. Next, select the newly created application and choose to add a bot user to the application. This will create a bot user for the application.
  3. A token associated with the bot should be available now. This token will be necessary when running the bot.

Setting up Voice RSS

  1. Go to the Voice RSS website and register for a Voice RSS account
  2. After registering, an API Key will become available. This key will be necessary when running the bot.

Running the Bot

  1. Ensure that Node v8.0.0 or higher is installed. This can be checked by running node -v. See the node.js website for more details on installing the latest version of node.
  2. Run npm install to install all necessary dependencies. Some peer dependencies may be missing, these are not necessary to run the bot and can be ignored.
  3. Export the Discord Bot Token, the Voice RSS API Key, and the MongoDB url. This can be done as follows:
export VOICE_KEY=<VOICE_RSS_API_KEY>
export DISCORD_TOKEN=<DISCORD_TOKEN>
export MONGODB_URL=<MONGODB_URL>

Or in Windows:

set VOICE_KEY=<VOICE_RSS_API_KEY>
set DISCORD_TOKEN=<DISCORD_TOKEN>
set MONGODB_URL=<MONGODB_URL>

There are other environment variables that can be set. See the environments variables section for more information on these variables.

  1. Type npm start to start the bot now

Basic Commands

  • !help - Prints a list of commands
  • !ping - Pong!
  • !summon - Summons the bot into the caller's voice channel
  • !banish - Forces the bot to leave the voice channel it is connected to
  • !give <User> <Positive Num> - Give guild currency to user
  • !mug <User> - Attempts to steal guild currency from a user
  • !create - Create a custom command beta

Admin Commands

  • !adminGive <User> <Integer> - Gives a user of guild currency
  • !setCurrency <String> - Sets the name of the guild currency

Environment Variables

  • VOICE_KEY(Required) - The VoiceRSS API key
  • DISCORD_TOKEN(Required) - The Discord Bot token
  • TRIGGER_PREFIX(Optional) - The prefix for a command (ie. The exclamation mark in the command !help)
  • MONGODB_URL (Required) - The url to a MongoDB database

About

A voice announcer that announces when users enter or leave a voice channel on Discord

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published