# Getting Started

## Official Discord server

To stay up to date, get the early access role, request new features, and report bugs, join the official RustPlusTwo Development Discord: <https://discord.gg/54nv3qGJ4B>

## Setting up the bot

In order to be able to use the bot in your server, you will need to obtain the following from the pairing app:&#x20;

* Server IP
* Server port for rust+
* Your ID (Steam 64)
* Your token

{% content-ref url="/pages/-Mkt8HyREydlqol8DphZ" %}
[Pairing](/pairing)
{% endcontent-ref %}

Afterwards, you can get the bot started by running the following commands:

```
/setconfig <server ip> <server port> <your id> <your token>
```

{% hint style="info" %}
Server port refers to the Rust+ app port. This may differ from the game port.
{% endhint %}

{% hint style="info" %}
If for some reason the bot fails to start the connection process, but it said the information was valid after running /setconfig, use the /setup command.
{% endhint %}


# Pairing

Obtaining server info is a pretty straightforward process. Here's how to get started:

{% content-ref url="/pages/Zmu3MV9NluASH1N1AUtG" %}
[Alternative](/pairing/alternative)
{% endcontent-ref %}

## Get the extension for your browser

| Browser engine     | Link                                                                                                     |
| ------------------ | -------------------------------------------------------------------------------------------------------- |
| Auto detect        | <https://rustplustwo.com/pairing/extension>                                                              |
| ~~Chromium based~~ | [~~https://rustplustwo.com/extension/chrome-0.1.crx~~](https://rustplustwo.com/extension/chrome-0.1.crx) |
| Firefox            | <https://rustplustwo.com/extension/firefox-0.1.xpi>                                                      |

Chromium one is unsigned so you most likely will be unable to install it for now. Until then use Firefox version or if you really want -- download it, unpack it, and install it manually via chrome://extensions

## **Connect your Rust account**

&#x20;

<div align="left"><figure><img src="https://3790795375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkt8-VJ1K_NURQD6iO2%2Fuploads%2F5KCSjn5L9cNtqHxniqH5%2Frp2-login-noext.png?alt=media&amp;token=cdb75f5d-696a-4b7c-97af-5e070a78185c" alt="" width="375"><figcaption><p>https://rustplustwo.com/login/rustplus</p></figcaption></figure> <figure><img src="https://3790795375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkt8-VJ1K_NURQD6iO2%2Fuploads%2Fao2NkEiNJS0Ba0MJMAUd%2Frp2-login-ext.png?alt=media&amp;token=9fa2b992-8600-4182-8924-7bd1aacc1544" alt="" width="375"><figcaption><p>https://rustplustwo.com/login/rustplus</p></figcaption></figure></div>

<figure><img src="https://3790795375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkt8-VJ1K_NURQD6iO2%2Fuploads%2Fd3UzyuwZZ5X8Cb0Ti4tn%2FRust-login-page.png?alt=media&amp;token=9aa94966-e7e6-4cb9-930d-15abb785bd58" alt=""><figcaption><p>https://companion-rust.facepunch.com/login</p></figcaption></figure>

{% hint style="info" %}
Some servers will not work with RustPlusTwo. This may be due to a configuration issue or the server owners disabling access.
{% endhint %}

## Pair servers and entities in-game

Ensure all indicators in the bottom left are green. If some are red or yellow, re-login. Once on the main page, pair entities from in-game to see them appear here.

![Click to enlarge](https://3790795375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkt8-VJ1K_NURQD6iO2%2Fuploads%2FjPay9FVLrWSfaYqdm2m8%2FWebPairingDemo1.png?alt=media\&token=4242ad31-a3b4-4432-b591-d9d8993837b5) ![Click to enlarge](https://3790795375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkt8-VJ1K_NURQD6iO2%2Fuploads%2FrEf0AbY9B2vEZtZW43Ae%2FWebPairingDemo2.png?alt=media\&token=637b8396-a4ba-46cb-b1c8-cce44cd60466) ![Click to enlarge](https://3790795375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkt8-VJ1K_NURQD6iO2%2Fuploads%2FJbRzhE9XFQ4z0tL3YHeY%2FWebPairingDemo3.png?alt=media\&token=ff8ed8be-57d6-4841-9552-31db974a833d)


# Alternative

{% hint style="warning" %}
If you already completed setup, you don't need to do this step
{% endhint %}

If you don't want to use the pairing app, here's an alternative way to retrieve pairing information (for advanced users):

* Install [node.js](https://nodejs.org/)
* Open a terminal, run the following commands one at a time
* Enter Y if prompted
* Pair servers and entities in-game&#x20;

```bash
npx @liamcottle/rustplus.js fcm-register
npx @liamcottle/rustplus.js fcm-listen
```


# Discord - Teamchat sync

To get started with syncing Discord and teamchat, use the */setchannel teamchat* command then run */teamchatlink*. Once you create a team, wait at most 30 seconds to ensure that the team is detected, then any messages should be mirrored to the other platform.

{% hint style="info" %}
Make sure that the bot has view channel and send messages permissions in the set Discord channel.
{% endhint %}


# Administration

{% hint style="info" %}
All commands start with the prefix !, or your custom prefix.\
Inside usage arguments, "?" denotes an optional argument
{% endhint %}

#### auth

```
- Description: Grants/removes user access to commands.
- Usage: !auth <add|rem> <steam64>
- Example: !auth add 76561197960287930
- Tier: free
- Usable by: owner only
```

#### authlevel

```
- Description: Turns on/off auth checking. (Some commands remain owner only).
- Usage: !authlevel <true|false|1|0>
- Example: !authlevel true
- Tier: free
- Usable by: owner only
```


# Chat

{% hint style="info" %}
All commands start with the prefix !, or your custom prefix.\
Inside usage arguments, "?" denotes an optional argument
{% endhint %}

#### delay

```
- Description: Sets a chat delay for bot responses (in ms).
- Usage: !delay <0-5000>
- Example: !delay 3000
- Tier: free
- Usable by: anyone
```

#### tr

```
- Description: Translate a message to another language
- Usage: !tr <toLang> <fromLang | 'auto'> <message>
- Example: !tr en auto Allons attaquer cette base à m12
- Tier: premium
- Usable by: anyone
```


# Entities

{% hint style="info" %}
All commands start with the prefix !, or your custom prefix.\
Inside usage arguments, "?" denotes an optional argument
{% endhint %}

#### bulkswitch

```
- Description: Turns on/off all added switches
- Usage: !bulkswitch <on|off|add|remove|list> <switch id?>
- Example: !bulkswitch on
- Tier: free
- Usable by: owner and authorized
```

#### group

```
- Description: Manages groups of switches
- Usage: !group <add|rem|list> <"group name"> <switch id?>
- Example: !group add "turrets" 123456
- Tier: premium
- Usable by: owner and authorized
```

#### listen

```
- Description: Listens to a smart alarm
- Usage: !listen <add/remove/list> <entityId> <name?>
- Example: !listen add 123456 trapbase
- Tier: free
- Usable by: owner and authorized
```

#### off

```
- Description: Turns off a smart switch with the given id/name.
- Usage: !off <id|name|"group name">
- Example: !off 123456
- Tier: free
- Usable by: owner and authorized
```

#### on

```
- Description: Turns on a smart switch with the given id/name.
- Usage: !on <id|name|"group name">
- Example: !on 123456
- Tier: free
- Usable by: owner and authorized
```

#### pair

```
- Description: Pairs a id with a custom name. Overwrites if given same name.
- Usage: !pair <add|rem|list> <id?|name> <name?>
- Example: !pair add 123456 sams
- Tier: free
- Usable by: owner and authorized
```


# Information

{% hint style="info" %}
All commands start with the prefix !, or your custom prefix.\
Inside usage arguments, "?" denotes an optional argument
{% endhint %}

#### commands

```
- Description: Lists commands in a category, or lists categories if none provided.
- Usage: !commands <category?>
- Example: !commands entities
- Tier: free
- Usable by: anyone
```

#### help

```
- Description: Provides info on a specific command, or links docs if none provided.
- Usage: !help <command?>
- Example: !help help auth
- Tier: free
- Usable by: anyone
```

#### time

```
- Description: Fetches the current time on the server, along w/ sunrise and sunset times
- Usage: !time N/A
- Example: !time 
- Tier: free
- Usable by: anyone
```


# Map

{% hint style="info" %}
All commands start with the prefix !, or your custom prefix.\
Inside usage arguments, "?" denotes an optional argument
{% endhint %}

#### pop

```
- Description: Shows current online players.
- Usage: !pop N/A
- Example: !pop 
- Tier: free
- Usable by: anyone
```

#### search

```
- Description: Searches map vending machines for a chosen item.
- Usage: !search "<itemName|'any'>" "<currencyName?|'any'>" <sort?:bestDeal|mostItems|cheapest> <itemBlueprint?:true|false|1|0> <currencyBlueprint?:true|false|1|0>
- Example: !search "MP5A4" "scrap" deal false false
- Tier: premium
- Usable by: anyone
```

#### seed

```
- Description: Displays server seed and salt.
- Usage: !seed N/A
- Example: !seed 
- Tier: free
- Usable by: anyone
```

#### when

```
- Description: Shows time since last cargo / oil / crate / heli
- Usage: !when <cargo|heli>
- Example: !when cargo
- Tier: free
- Usable by: anyone
```

#### wipe

```
- Description: Shows time since last wipe.
- Usage: !wipe N/A
- Example: !wipe 
- Tier: free
- Usable by: anyone
```


# Team

{% hint style="info" %}
All commands start with the prefix !, or your custom prefix.\
Inside usage arguments, "?" denotes an optional argument
{% endhint %}

#### ghoster

```
- Description: Finds users who may be ghosting. Anyone not manually set as non ghoster will appear as ghoster.
- Usage: !ghoster <add/rem?> <id?>
- Example: !ghoster add 76561197960287930
- Tier: free
- Usable by: owner and authorized
```

#### leader

```
- Description: Sets the new leader of a team.
- Usage: !leader <steam64>
- Example: !leader 76561197960287930
- Tier: premium
- Usable by: owner and authorized
```

#### teaminfo

```
- Description: Provides team member stats.
- Usage: !teaminfo N/A
- Example: !teaminfo 
- Tier: premium
- Usable by: owner and authorized
```


