Kronos allows you to create server-wide events and personalized reminders with ease. Engage your server with events, stay on track with reminders, and more! Invite Kronos here.
Requirements: node.js version 16.9 or later, yarn, typescript
In order to use Kronos, create a folder named dist
in the root of the project. You'll see why later. You must also create a .env file in the root of the project with the following variables:
TOKEN
(your bot token)GUILD_ID
(your test guild id. slash commands will be instantly registered in this guild)SUCCESS_COLOR
(the success color of embeds -- don't include the hashtag)ERROR_COLOR
(pretty self explanatory)MONGO_URI
(the MongoDB connection string)DEPLOYMENT
(this should be false on your development environment and true in your deployment environment -- I'll explain this later)
Given that I'm using TypeScript for this discord bot, you will need to compile it into JavaScript. Don't worry, I already have the script setup for you but you might need to edit it a bit. I prefer to compile the code into a folder named dist and run dist/index.js as the main file. This means that we must delete the dist folder and recompile everytime we run the bot. The command to do this will vary per operating system. If you're using windows, you can keep the package.json file as is. If not, you will have to replace the dev
script with the (command to delete dist) && yarn start
.
So why do I have the deployment environment variable? I'm hosting the bot on a linux environment and therefore, the command to delete the dist folder will be different. You'll notice I have the heroku script which runs build with the linux command to delete dist. If you're not hosting on a linux environment, make sure to edit the prebuild
script accordingly.