The Official Bot of the Full Sail Armada
Interested in learning how to use Max? See the Usage documentation here.
Clone the Codebase.
git clone [email protected]:reactivepixel/Max-Bot.git
.env file with the following sensitive information. Replace the "xxx"'s with some unique information for your local Environment.
!verifywill not work unless you additionally configure your own Gmail account to work with this bot. The Official Max email info will not be distributed.
NODE_ENV=development DEBUG_MODE=3 DISCORD_BOT_TOKEN=xxx_bot_token_from_next_step_xxx MYSQL_ROOT_PASSWORD=xxx MYSQL_USER=xxx MYSQL_PASS=xxx MYSQL_DATABASE=max MYSQL_HOST=localhost EMAIL_USERNAME=xxx EMAIL_PASS=xxx GOOGLE_APP_PASSWORD=xxx
DISCORD_BOT_TOKENwith the token you receive from the next step.
Add a new App and create a Bot User then obtain the Discord App Bot Token from the created Bot User or contact a Release Manager for Max's Dev Bot token.
DISCORD_BOT_TOKEN in the .env file with the token provided to you.
$ gulp pm2 to create a max.config.js file within your root directory.
Adding the Bot to a Server
As an authorized user of the bot you will need to add it to a server.
- Go to the Discord developer pages (login if you haven't).
- Go to the application with the bot you want to add to your channel.
- Copy the Client/Application ID.
- Go to https://discordapp.com/oauth2/authorize?client_id=```CLIENT_ID_GOES_HERE```&scope=bot&permissions=0
- Select server and click authorize.
Optional Configure Email Functionality
Max uses Nodemailer to send verification emails to users joining the Armada server. to work proper locally please follow these steps to create a new gmail account to locally test with:
- Create a new gmail.com account
- Once logged in with this account enable less secure application access.
- fill in the
EMAIL_PASSvalues on the
.envfile with this new gmail account's info.
Running the Bot Locally
npm install npm start
Ensure your local IDE has the ability to add eslint plugins. Atom is recommended.
Install the linter-eslint package for Atom.
apm install linter-eslint
Confirm Linting Works
Debug Tool Documentation
Example of Usage
Instead of console.log() require the tool.js file and call the .debug() method passing in three arguments (title, output, level)
[code] to call a debug() [code] to activate debug_mode
Should be a string that will prefix the output argument in the resulting console.log()
Any object that will be suffixed onto the title argument in the resulting console.log()
A number that indicates how fine grained the output of this particular output should be. Reference the Debug Level Chart
Debug Level Chart
- Production Environment Level Output
- Staging Environment Level Output
- General Debug Information for Development
- Very Detailed and in-depth Output.
- Highly Fine Grained Detailed and in-depth Output.