Go to file
Schplee 37852f0398 replaced pokemon with duplicate game message 2017-06-04 14:46:30 -07:00
commands Fixed the warning length count in total warnings. 2017-04-07 22:34:56 -04:00
config replaced pokemon with duplicate game message 2017-06-04 14:46:30 -07:00
models Initial push of discord-bot code. 2016-12-07 22:56:16 -05:00
triggers Removed logging from Github module as we're now logging in server.js for triggers. 2017-03-30 21:29:32 -04:00
.gitignore Added data folder to gitignore. 2017-04-07 19:17:55 -04:00
LICENSE Initial commit 2016-12-07 22:27:08 -05:00
README.md Fixed formatting errors 2017-04-23 17:22:27 -04:00
app.js Initial push of discord-bot code. 2016-12-07 22:56:16 -05:00
data.js Initial push of discord-bot code. 2016-12-07 22:56:16 -05:00
logging.js Check if logdnaKey is defined before attempting to use it. 2017-04-07 19:22:57 -04:00
package.json Added startup script.' 2017-05-06 19:12:30 -04:00
server.js Updated disabled module and trigger code. 2017-04-07 19:36:45 -04:00
start_production.sh Added startup script.' 2017-05-06 19:12:30 -04:00

README.md

Setting Up Discord

Create server in Discord.

Create text channel for logs.

Create roles Admins and Moderators.

Invite Bot to your Server (see Creating a Bot User below).

Make bot a Moderator.

Install & Dependencies

Install Node.js and NPM.

Install forever (task scheduler).

npm install -g forever

Clone repository and install package dependencies.

git clone https://github.com/citra-emu/discord-bot.git
cd discord-bot
npm install

Create new JSON file for bot config with the following contents in the directory specified below:

For Development: ./config/development.json

For Production: ./config/production.json

{
  "logChannel": "",
  "clientLoginToken": ""
} 

To get logChannel, type \#YOUR_CHANNEL_NAME in your Discord server chat.

Copy string of numbers after # into "logChannel": ""

Copy App Bot User token to "clientLoginToken": ""

Running Bot

For Production

./start.sh Requires a config/production.json file.

For Development

node server.js Requires a config/development.json file.

License

GNU General Public License v2.0

Creating a Bot User.

First you need to go to discord developers and click "New Application" Application Screen Now give your bot a name and a picture, a description isn't necessary. New Application Screen Click "Create Application". On the next page scroll down until you see "Create a bot user", click that. Also click yes do it. Screen you see after creating a new application then scrolling down a little. Yes Do It. Now you can get your bot's token, by using the "click to reveal button" in the app bot user section. Remember to uncheck Public Bot New Bot Page Token There's your token! Now its time to invite your bot to your server. Don't worry about your bot being started for this next step. Change the client_id in the URL to your Client ID under App Details, then go to this url https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=0 Authorize Bot Now select your sever, then click authorize. Authorized That's it! Now you can start your bot.