Skip to content

Version 2 of the previous RustPlus-Discord-Bot. A NodeJS Discord Bot that uses the rustplus.js library.

License

Notifications You must be signed in to change notification settings

Nou4r/rustPlusPlus

 
 

Repository files navigation

discord reddit donate on ko-fi

rustPlusPlus ~~~ A Rust+ Discord Bot

Version 2 of the previous RustPlus-Discord-Bot. A NodeJS Discord Bot that uses the rustplus.js library.

Setup

Required Software

Clone the repository

Run the following commands to clone the repository:

$ git clone https://github.com/alexemanuelol/rustPlusPlus.git
$ cd rustPlusPlus
$ npm install

Create a discord bot

  • Go to this website: https://discord.com/developers/docs/intro
  • Click on Application in the top left corner.
  • Click on New Application in the top right corner.
  • Give it a name and click Create.
  • You should now be able to see the Application Id or Client Id, add that ID to the config.json file under the clientId property.
  • Click on the Bot tab on the website.
  • Click on Add Bot.
  • Click Yes, Do it!.
  • Click on the Copy button to copy the bot token, then paste it to the config.json file under the token property.
  • Click on OAuth2 tab on the website.
  • Scroll down to OAuth2 URL Generator.
  • Check the following boxes: bot and applications.commands
  • Scroll down to Bot permissions and select the following: Administrator
  • Copy the URL (This is used to invite you discord bot to discord servers (guilds))

How to run the bot

Run the following command to start the bot (starting from repository root):

$ node .

How to set credentials (IMPORTANT)

Run the following commands to retrieve credential data (starting from repository root):

$ cd src/external
$ npm install
$ node .

This will open up an instance of Google Chrome where you need to login with your Steam Account to get access to Rust+ credentials. Once the login is successful, you will be given a Discord Slash Command string (/credential set) that you shall copy and then run in your Discord Server Text Channel. Which Text Channel you run the Slash Command is not important, as long as the bot has access to it.

TODO

Discord commands

  • /help command to display a help message
  • /reset command to reset rustplus instance for the guild
  • /resetchannels command to reset channels (Add missing channels etc...)
  • /setnotification command with all notifications as sub commands, boolean to set on or off
  • /switch command with subcommands: add, remove, removeall, on, off. Set auto-ON, custom name.

In-Game commands

  • bradley, time before bradley should respawn
  • cargo, time before cargo enters egress stage
  • leader, give team leadership
  • pop, to get the current population of the server, max players and size of queue.
  • time, to get the current time of the server.
  • timer, set a custom timer
  • wipe, to get the time since the wipe.
  • small, to get the time left before crate on small oilrig unlocks.
  • large, to get the time left before crate on large oilrig unlocks.

Information Text Channel

  • Display things like Server name, ip and port, players, current time, time since wipe, etc...

Events Discord Text Channel

  • Cargo Ship detected notification
  • Cargo Ship left notification
  • Cargo Ship entered egress stage notification
  • Bradley APC got destroyed notification
  • Bradley APC should respawn notification
  • Patrol Helicopter got downed notification
  • Locked Crate spawned on Cargo Ship notification
  • Locked Crate respawned on Oil Rig notification
  • Locked Crate got dropped at a monument notification
  • Locked Crate got looted or despawned on Cargo Ship notification
  • Locked Crate got looted at Oil Rig notification
  • Locked Crate got looted or despawned on monument notification
  • Locked Crate at monunment despawn warning notification
  • Locked Crate at Oil Rig unlocked notification
  • Heavy Scientists called at Oil Rig notification
  • Chinook 47 detected notification
  • New Vending Machine detected notification
  • Patrol Helicopter enters the map

Alerts Discord Text Channel

  • Smart Alarms
  • Tool Cupboard decay Alert
  • Vending Machine item detected

Switches Discord Text Channel

  • Interface of Smart Switches to turn then on or off
  • Clear all messages on restart

Storage Monitor Text Channel

  • Interface of Storage Monitors that display time left, content, etc...
  • Clear all messages on restart

General Discord Text Channel

About

Version 2 of the previous RustPlus-Discord-Bot. A NodeJS Discord Bot that uses the rustplus.js library.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%