A Discord Bot to interact with Crafty Controller
So far all it does is start one server.
It is assumed you have already made a bot and got its token. Also, you need to have made an API key for Crafty Controller, make sure the user that the key is based off has perms to the server.
-
Install Nodejs and import the repository, then run the command in the repository folder:
npm install
-
Create a file called
.env
, this is where all the secret stuff is stored. Inside.env
put you secret stuff in this format:DISCORD_TOKEN=<token> CRAFTY_TOKEN=<token> CRAFTY_SERVER_URL=https://localhost:8000/ # This URL is assuming you host it on the local machine with the default port (make sure to include the "/" at the end!) CRAFTY_SERVER_ID=7010d5b8-cb49-4334-9d99-6f0ef860a672 # Example ID
-
Run the bot using command
node src/bot.js
>start
- Starts the server
I am learning JavaScript so if you find any errors or bad practice any help is appreciated.
Turn server off after period of time✅- Turn server off with a command (configurable)
- Config file
- Multiple servers
- Channel binds for different servers
- Statistics (players and stuff)
- suggestions are welcome!
Read it! (pls read if you want to do anything with it!!) (License tab!!!!!!)