Make sure your environment is ready to start the bot.
Make sure all modules are installed and ready
npm install
Will install dependencies
- Download MongoDB Community Server
- Download MongoDB Compass (if not included with installer)
- Open a Terminal and navigate to the MongoDB Directory
C:/Program Files/MongoDB/Server/<VERSION>/bin
- Proceed by typing
mongo
to bring up mongo shell- Create the Database
use forbidden
will now swap to it (will be created once the collection exists)- Create the settings collection
db.createCollection("settings")
- Create the Admin User. Type on a single line and create your own user and pwd
db.createUser({ user: "Admin", pwd: "password", roles: [{ role: "userAdminAnyDatabase", db: "admin" }] })
- Create a read write user which is used by the bot. Type on a single line
db.createUser({ user: "User", pwd: "password not same as Admin", roles: [{ role: "readWrite", db: "forbidden" }] })
Setup your
tokens.json
follow thetokens-template.json
Having blank tokens will not break the program. The only required fields are
- Bot Token
- Bot Prefix
- Database