Skip to content

Theedgeclan2/new-hope

Repository files navigation

Rust discord bot that displayes online players

Docker Automated build Docker Pulls Docker Build Status

Discord-bot

Bot

Updates activity status on discord bot and displays how many players are connect to your rust server from rest api

Written in nodejs and requires npm and nodejs.

You can run it on windows, macOS, linux or docker, se the installation for more info.

  • Support rust-servers.info
  • Support rust-servers.net
  • Bot update status every 6 minutes

Configuration

config.json

{ 
  "debug" : false,
  "token"  : "your token here",
  "apiSite" : 1,
  "apiUrl" : "https://full uri here",
  "enableRcon" : "0",
  "rconhost"   : "",
  "rconport"   : "",
  "rconpass"   : "",
  "prefix" : "!",
  "roles"  :  ["Administrator", "admins"]
}

Installation:

  1. Download it as zip or use git clone https://github.com/kennethrisa/discord-rustserverstatus.git
  2. Extract it and open folder, than open powershell in the same folder.
  3. Run command: npm install (This downloads the require modules from package.json)
  4. a: You can manualy do this with command: npm install discord.js request
  5. b: You should now see that you have a new folder node_modules.
  6. Open config.json and add your token from (Do not use client secret) https://discordapp.com/developers/applications/me/ Discord-bot-token
  7. Now we can start the bot with command: node app.js and you should see that the bot is started, wait 6 min, and the status should be updated.

Windows only: Install the app as a windows service.

  • Open powershell: npm install
  • npm install -g node-windows
  • npm link node-windows
  • node installSVC.js
  • You will get some prompt to allow it to install, press yes on all.
  • Open services.msc and see discord-rustserverstatus is started. now it will always start on bootup.
  • Uninstall:
    • node uninstallSVC.js
    • Press yes on all prompts

Linux only: Start bot always using forever

  • $ npm install forever -g
  • $ forever start /path/to/app.js
  • Someone named nimdasys on oxide reported it. Thanks

Create your discord-bot and invite it to your server:

Docker

docker run --name discord-rustserverstatus --restart=unless-stopped \
   -e token="your token here" \
   -e apiSite=1 \
   -e apiUrl="https://full uri here" \
   -e enableRcon=1 \
   -e rconhost=yourip \
   -e rconport=28016 \
   -e rconpass="yourpassword" \
   -e prefix="!" \
   -e roles="Administrator" \
   kenrisa/discord-rustserverstatus:latest
  • Using docker-compose
git clone https://github.com/kennethrisa/discord-rustserverstatus.git
docker-compose pull
docker-compose up -d
  • You can also build the image your self using the docker-compose
git clone https://github.com/kennethrisa/discord-rustserverstatus.git
docker-compose build
docker-compose up -d

Credits

Github Didstopia

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published