A Discord Bot to interact with and control Crafty Controller through commands in chat
So far all it does is start one server.
A basic knowledge of command line is assumed.
-
Install Nodejs and import the repository, then run the command in the repository folder:
npm install
-
Run the bot using command
node .
Here is the default configuration file:
{
"bot": {
"token": "BOT_TOKEN"
},
"crafty": {
"api_token": "CRAFTY_TOKEN",
"server_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"url": "https://localhost:8000/"
},
"commands": {
"slash": {
"enabled": true
},
"text": {
"enabled": false,
"prefix": "!"
}
}
}
bot.token
- The discord bot's token. Learn how to get one here
crafty:
api_token
- The api token for crafty controller user, make sure it has the COMMANDS permission and access to the server.
server_id
- The uuid of the server. You can find it in the link to the server near the end.
url
- The url to access the controller
commmands:
slash.enabled
- Whether slash commands are enabled, recommended true
text.enabled
and text.prefix
- Whether text commands are enabled, for example, if prefix if set to !
, help command would be !help
/start
- Starts the preconfigured server
I am still learning JavaScript so if you find any errors or bad practice any help is appreciated.
Turn server off after period of time.✅Config file.✅- Turn server off with a command (configurable).
- Handling multiple servers.
- Channel binds for different servers.
- Statistics (players and stuff) *maybe?*.
- suggestions are welcome!
Check License tab.