A bot for Conaticus' Discord server. A document of the development process has been made here: https://www.youtube.com/watch?v=xq2jR3_msmk.
If you like cool coding projects like this, subscribe to me at https://www.youtube.com/channel/UCRLHJ-7b4pjDpBBHAUXEvjQ
- Clone/Fork the repository
- Run
cd boolean
- Run
npm i
In order to setup the bot, you must create a .env
in the parent directory as you can see in the example, .env.example.
In this file you must declare the bot's TOKEN
- this is the token from the Discord Developer Portal.
Syntax:
TOKEN="your bot's TOKEN"
This will automatically be ignored from the .gitignore. So don't worry about this data being public.
In order to start the bot, you must run npm run dev
to run the TypeScript developer environment. Don't worry about the other package.json
scripts, they are for production.
Due to many of the values being hardcoded, in order to run your instance you will need to change some values - such as the guildId
in config.ts
as it is used for deploying slash commands.
General: "ORANGE"
Success: "GREEN"
Error: "RED"
The configuration file is used for constant variables that will be reused in the application, such as ids and reaction messages. It is located at /src/config.ts - feel free to add anything that matches this description.
Data is currently stored in the data.json file. Only reaction messages are stored here, which is why a database is not present. If you are adding more data handling to the bot, please switch to sqlite.
To specify something in the config find the config
object in the config.ts
file, after specify something like "NAME": <VALUE>
.
To read from it, require config
then read the value specified by doing config.<VALUE TO READ>
.
- Fatal :
logger.console.fatal("")
- Error :
logger.console.error("")
- Warn :
logger.console.warn("")
- Info :
logger.console.info("")
- Debug :
logger.console.debug("")
- Trace :
logger.console.trace("")
- Silent :
logger.console.silent("")
-Embed : logger.channel(<EMBED>, <CHANNEL>)
Look at CONTRIBUTING.md to find out how you can help contribute to the development of this bot.