A Discordjs Bot built with the intention of collecting user sessions in games and saving them to a database. You can also use the Docker container listed below. Recently I have rewritten the database to include the activity object discord returns for each member.
- You will need to obtain a Discord Bot TOKEN
https://discord.com/developers/applications
- Npm (If you intend to use this as a nodejs app)
npm install npm@latest -g
- Docker (If you intend to use docker use this)
https://hub.docker.com/repository/docker/damianisaacs/kronos
- Clone the repo
git clone https://github.com//Dsiman/Kronos.git- Navigate to the download location and install NPM packages
npm install- Make a mongodb database to store your sessions
https://www.mongodb.com/
- Enter your enter your Discord bot token and mongodb connection string in your environment variables( or in a .env folder in the root of the bot)
token=somestringprovidedbydiscorddeveloperportal
mongoURI=mongodb+srv://<Username>:<Password>@mongodb.com/<Database>- Run your bot
npm start- Install docker
https://docs.docker.com/get-docker/- Get Kronos from dockerhub
docker pull damianisaacs/kronos- Define your environment variables
/* make a .env file containing */
token=somestringprovidedbydiscorddeveloperportal
mongoURI=mongodb+srv://<Username>:<Password>@mongodb.com/<Database>- Run your bot
docker run --env-file .env damianisaacs/kronos- Invite your bot to the server
https://discord.com/developers/applications/<YourBotAppID>/oauth2/url-generator