- A Discord Bot which alerts user when an exam is close by , User can also post , edit and delete Exam Schedules.
Video Tutorial Link Here
- NodeJS - evented I/O for the backend
- Express - framework for backend
- Mongoose - ODM
- MongoDB - Database
- Node Cron - Job scheduler
- Axios - Promise based HTTP client for the browser and node.js
These instructions will get your copy of the project up and running on your local machine for development and testing purposes.
You need to have Node
or npm
installed on your machine.
git clone <git repo>
- Go to DeveloperDiscord to create an application.
- Go inside your app and then goto BOT on the sidebar settings.
- Then copy the BOT Token and paste it in the config.env.
DISCORDJS_BOT_TOKEN=<Your Token Goes here>
- Then go to oauth2 in the settings and copy the clientID.
- Open a new Tab and on the address bar type
https://discord.com/oauth2/authorize?client_id=<Your ClientID goes here>&scope=bot
- Then you will see something like this.
- Note : You can only include your bot in servers where you have permission to do so.
- This concludes the addition of the Bot.
$ npm install
$ cd config
fill the values for environment variables in config.env
.
MONGO_URI =
PORT = <Your Custom Port>
BASE_URL = http://localhost:<Your Custom Port>
After setting up environment proceed with local run
$ npm start
.
├── config
│ ├── config.env
│ ├── db.js
├── models
│ ├── quiz.js
├── routes
│ ├── route.js
├── src
│ ├── bot.js
│ ├── scheduler.js
├── index.js
├── package.json
├── package-lock.json
├── README.md
$ heroku login -i
$ heroku git:remote -a <your-app-name>
$ git push heroku master
Set up environment variables
$ heroku config:set ENV_VAR=<value>