Skip to content
This repository has been archived by the owner. It is now read-only.
Region role assigner bot for League of Teemos server on Discord
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
views
.editorconfig
.gitattributes
.gitignore
.travis.yml
LICENSE
Procfile
README.md
config.json
gulpfile.js
package.json

README.md

Sir Narwhal [DEPRECATED]

Sir Narwhal
Region role assigner bot for League of Teemos server on Discord

Discord server Travis build status Dependencies status Code Climate GitHub latest release GitHub license

About

NOTICE: This project is no longer under development.

Sir Narwhal is a channel-based, multipurpose bot commissioned for the League of Teemos server on Discord.

The bot has various functions, including giving unique "region" roles to users upon request, welcoming new members to the server, and automating an interactive "count" game.


The bot's source code, written in Node.js with the Discord.js library, is located in src. The website is served from ./src/index.js using Express, and a majority of the bot's functions are located in ./src/commands.

The website's source code is located in ./views/index.ejs; however, its static files (CSS stylesheets, images, fonts) are located in the ./src/static folder.

Installation

Prerequisites

Before you get started, make sure you have:

Instructions

  1. Open your command line interface (CLI).

  2. Clone this repository:

    $ git clone https://github.com/synicalsyntax/sir-narwhal
  3. Switch to the local copy of this repository:

    $ cd ~/path-to-repo/sir-narwhal
  4. Install the dependencies in the local node_modules folder:

    $ npm install
  5. If necessary, create a Discord bot account for your local copy of the bot by following this guide, and invite it to your server.

  6. Modify the available options in the example config.json to valid values.

Configuration

You can modify the following values in config.json to customize the behavior of Sir Narwhal:

  • token (REQUIRED): Your Discord bot account's token. Under no circumstances should you reveal the value of this field to others, lest the likely compromise of your bot.

  • regionGroupingChannelID: The ID of the text channel that Sir Narwhal will check prompts to join region roles for. If null, the region assignment functionality will be disabled.

    • regionResponseChannelID: The ID of the text channel that Sir Narwhal will announce region assignments to. Required if regionGroupingChannelID is not null.

    • regionJoinCooldown: Number of minutes that a user must wait before switching to a different region. Required if regionGroupingChannelID is not null.

    • regions: Array of strings of role names that represent the regions users can join. Bot must have the right permissions and position in the role hierarchy in order for proper functionality. Required if regionGroupingChannelID is not null.

  • joinMessageID: The ID of the message that Sir Narwhal checks for green checkmark () reactions. If null, the new member initiation functionality will be disabled.

  • joinChannelID: The channel ID of the message that Sir Narwhal checks for green checkmark () reactions. If null, the new member initiation functionality will be disabled.

    • defaultRole: The role name that new members gain when they complete initiation. If null, no role will be assigned.

    • welcomeChannelID: The channel ID that Sir Narwhal will send a welcome message to when a new member is initiated. If null, no welcome message will be sent.

      • teemoQuotes: Array of strings that will be randomly included in welcome quotes. Required if welcomeChannelID is not null.
  • countChannelID: The ID of the text channel that Sir Narwhal will check responses to the count game for. If null, the count game functionality will be disabled.

  • adminChannelID: The ID of the text channel that Sir Narwhal will check for administrator-only commands for. This channel should only be accessible to administrators.

  • userChannelID: The ID of the text channel that Sir Narwhal will check for regular user commands for. This channel should only be accessible to users.

  • userPrefix: The prefix used for any administrator or user-prompted commands. Required if either adminChannelID or userChannelID is not null.

Usage

Once you have successfully installed and configured your copy of Sir Narwhal, ensure that you are in the folder with your local copy of this repository and run:

$ npm start
You can’t perform that action at this time.