Git Product home page Git Product logo

rustplus-discord-bot's Introduction

discord reddit donate on ko-fi

RustPlus-Discord-Bot

NOTE This is the old project, the newer and more advanced can be found here.

A NodeJS Discord Bot that uses the rustplus.js library to interact with Smart Devices, search for items for sale in vending machines, notify about in-game events such as Cargo Ship spawning or trigger of oilrig and other methods that is available through the Rust+ companion app.

How-To Setup

Setup Video

How to setup the RustPlus-Discord-Bot

Required Software

Follow the instructions for your operating system.

Windows

Download the following:

Ubuntu

Run the following commands:

$ sudo apt update
$ sudo apt install nodejs=14.17.3 npm=6.14.13 git

Arch Linux

Run the following command:

$ sudo pacman -S nodejs=14.17.3 npm=6.14.13 git

Setup the BOT

Open a terminal and run the following commands to clone the repository and install the required packages:

$ git clone https://github.com/alexemanuelol/RustPlus-Discord-Bot.git
$ cd RustPlus-Discord-Bot
$ npm install

Run the following command to register with FCM, Expo and link your Steam Account with Rust+.

$ npx @liamcottle/rustplus.js fcm-register

NOTE: Chrome/ Chromium is required for this step to work. It will open up an instance of the browser where you will have to sign in with your Steam Account and link with Rust+:

This will generate the configuration file rustplus.config.json which should remain in the same folder as the rustplusDiscordBot.js script.

Before we can start the BOT, we need to sort out the config.json file. There are some properties that needs to be filled out, these are:

  • steamId
  • serverIp
  • appPort
  • playerToken
  • token
  • botSpamChannel

The first 4 properties can easily be accessed by running the script:

$ cd tools/external
$ node copy_server_details_to_config.js

While this script is running, you simply join the rust server you want to play on, enter the menu and click on 'Rust+' and then press either 'PAIR WITH SERVER' or 'RESEND'. This will trigger a FCM notification that includes steamId, serverIp, appPort, playerToken and will automatically be copied into your config.json file.

token property can be gained by creating a Discord BOT for your Discord Server and copying the bot token into the config.json file.

botSpamChannel property can be gained by choosing one of the text channels in your Discord Server and simply copy the channel ID into the config.json file.

How to update the repository

Run the following commands:

$ git stash
$ git pull --rebase
$ git stash pop

Documentation

docs/documentation.md includes a detailed guide to all available commands and all the configuration settings.

Documentation

Screenshots and GIFs

TurnOn Smart Switches

Turn on Smart Switches

Pairing with Smart Devices

Pairing with Smart Devices

Running the help command

Help command

Running the getMap command

getMap command

Running the market command with assault as keyword

Market search

CargoShip active notification

Cargo Ship active

Explosion detected notification

Explosion detected

Thanks to

liamcottle@GitHub - for the rustplus.js library

rustplus-discord-bot's People

Contributors

alexemanuelol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.