Skip to content

A Discord Bot to interact with and control Crafty Controller

License

Notifications You must be signed in to change notification settings

Coosanta17/crafty_discord_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Discord Bot to interact with Crafty Controller

So far all it does is start one server.

How to use

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.

  1. Install Nodejs and import the repository, then run the command in the repository folder:

    npm install
  2. 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
  3. Run the bot using command

    node src/bot.js

Commands

>start - Starts the server

Other stuff

I am learning JavaScript so if you find any errors or bad practice any help is appreciated.

Future Features:

  • 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!

LICENSE.

Read it! (pls read if you want to do anything with it!!) (License tab!!!!!!)