Coder Social home page Coder Social logo

discord-announcer's Introduction

discord-announcer

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

discord-announcer's People

Contributors

justin-guan avatar alvinxie avatar

Watchers

James Cloos 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.