bot for the faeria discord
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
src
test/src
.gitignore
README.md
index.js
package.json
restart.sh

README.md

#Faeria Discord Bot

##USAGE

This discord bot provides tools for the Faeria Card Game community. The following built-in commands are provided:

!help

!ping

!add COMMANDNAME RESPONSE

!remove COMMANDNAME

!card CARDNAME

!art CARDNAME

!streams

!playing

You do not have to download/run this bot to add it to your server. The hosted bot can simply be asked to join your existing discord server.

To add the bot to your server, go to the following URL and select the server you would like the bot to join:

https://discordapp.com/oauth2/authorize?client_id=178648207939731456&scope=bot&permissions=0

In order to use !add or !remove to define custom commands for your server you will need to have one of the following discord roles. Only users with one of these roles will be able to use !add or !remove.

  • community managers
  • devs
  • moderators
  • architects

It is possible this will be per-server configurable in the future (open a github issue if you would like to see this supported).

If you want the bot to access private channels you must invite it to those channels and give it the correct permissions to send/read messages for that channel.

##DEVELOPMENT

Requires:

  • node.js
  • mongodb
  • a discord server you manage

###Clone this repo and install


	git clone https://github.com/Tidwell/faeria-discord-bot.git

	cd faeria-discord-bot

	npm install

###Create a discord application

You can create a new discord app here: https://discordapp.com/developers/applications/me

Once you have created the app, you will need to add an "App Bot User". This can be done by editing the created application.

###Create configuration

Create an index.js file in the config/ folder and update it with the App Bot User's token (found by editing the created application).

Also add your mongo connection string.

You can use the config/config.sample.js to see the format for this file.

###Add the bot to your test discord server.

You will need to be the server manager of a discord server to be able to add the bot.

From the application, copy the Client/Application ID and replace the *s in the following URL with that ID:

https://discordapp.com/oauth2/authorize?client_id=*************&scope=bot&permissions=0

After opening the url (with your ID) you should be presented with a dropdown to add the bot to your server.

###Run

You can now run the bot and it should connect to your server (assuming all previous steps were completed)

npm start

##Deployment

*Note* You may want to set up an automated tool, such as Jenkins to do this for you

  • clone the repo onto the production box (or git pull)

  • npm install to update any dependancies

  • run the app with some kind of restart cli tool (forever in this example) forever start index.js

  • ./node_modules/forever/bin/forever start index.js

  • when updating, run ./restart.sh - this will shut down any existing running process (by looking at discord-bot.pid file) and forever will restart the bot

###NOTES

To use the !elo command, you will need to create a writeable data folder in the root of the application.

TODO

-Wiki partials !wiki would be cool, e.g. !wiki Getting started => http://faeria.gamepedia.com/Getting_Started

-tests