# SW Status Bot

## What can the bot do <a href="#what-can-the-bot-do" id="what-can-the-bot-do"></a>

In brief the bot can do the following;

* Get stormworks server status and different types of stats.
* Get total players playing stormworks.
* Show when the server is out of date.
* Show when the server is offline.
* Allows users to ping a server from 15+ different locations around the world.
* Sends a DM when a server is offline. (when enabled)
* Sends a DM when a server is out-of-date. (when enabled)

## Getting started

{% stepper %}
{% step %}

#### Invite the bot

Open a ticket on our discord server and request access to this bot
{% endstep %}

{% step %}

#### Create a channel

Create a <mark style="color:purple;">`#server-status`</mark> channel or whatever you want to call the channel, this is where the bot will place the embed to show the server status.
{% endstep %}

{% step %}

#### Using the channel

Once you have created the channel, tell the bot to use the channel to show the status using:\ <mark style="color:$warning;">/config channel</mark> <mark style="color:$warning;">`channel:`</mark><mark style="color:purple;">`#server-status`</mark>
{% endstep %}
{% endstepper %}

## Configuring the bot

<mark style="color:blue;">Channel</mark> - The channel which the status embed will be sent and updated\
To set the channel: <mark style="color:$warning;">/config channel</mark> <mark style="color:$warning;">`channel:`</mark><mark style="color:purple;">`#channel`</mark>

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FbNtV1c2McDwHjOW104XI%2Fswconfigchannel.png?alt=media&#x26;token=42643752-3357-417e-beb1-656a776f4145" alt=""><figcaption></figcaption></figure></div>

<mark style="color:blue;">Servers</mark> - The list of servers to add or remove from the embed\
To add or remove servers: <mark style="color:$warning;">/config servers</mark>

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FbzQRnbafqSVJ67nhiiRv%2Fswconfigservers.png?alt=media&#x26;token=b13f4ebb-7077-4c7d-945b-7c108e96f1c0" alt="" width="358"><figcaption></figcaption></figure></div>

<mark style="color:blue;">Info</mark> - What server info to show in the status embed for each server.\
To add or remove info: <mark style="color:$warning;">/config info</mark>

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FkktuVFMXdHSAvEMai8QQ%2Fswconfiginfo.png?alt=media&#x26;token=2e00fdeb-c09e-4e6b-b462-1f8910c15d25" alt="" width="359"><figcaption></figcaption></figure></div>

<mark style="color:blue;">Title</mark> - The title of the embed.\ <mark style="color:blue;">Color</mark> - The color of the embed in hex.\
To set the title or color: <mark style="color:$warning;">/config embed</mark>

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FBMcsVHrBluLBsoBJ5XOS%2Fswconfigembed.png?alt=media&#x26;token=f7c4e2a1-5819-4c5a-a147-e02650b77b57" alt=""><figcaption></figcaption></figure></div>

<mark style="color:blue;">Admin Role</mark> - Users with this role can configure the bot <sup><sub>*(If there is no value, only users with the administrator permission can edit the bot).*<sub></sup>\
To set the admin role: <mark style="color:$warning;">/config adminrole</mark> <mark style="color:$warning;">`role:`</mark><mark style="color:purple;">`@role`</mark>

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FrcOW87bwbv0wAhOejgds%2Fswconfigadminrole.png?alt=media&#x26;token=d50b7a15-472e-40e7-a721-37f84b6366ae" alt=""><figcaption></figcaption></figure></div>

<mark style="color:blue;">Offline DM</mark> - Will DM admin role if any listed server is detected to be offline.\ <mark style="color:blue;">Outdated DM</mark> - Will DM the admin role if any listed server is detected to be out of date.\
To set DM settings: <mark style="color:$warning;">/config pinging</mark>

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FXVLElBK2ZDJgyNmQ53S0%2Fswconfigpinging.png?alt=media&#x26;token=873332d2-394a-4d0d-873f-8cd9e32c70e8" alt=""><figcaption></figcaption></figure></div>

## info types

Info types are managed by the <mark style="color:$warning;">/config info</mark> command.

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FaHxsYRXwA37vjQoRWS2j%2Fserverstatusinfotype1.png?alt=media&#x26;token=274aba08-cc33-43fa-860a-dae8839b91b8" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="51.550048828125">No.</th><th width="157.7000732421875">Info Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>players</td><td>Shows the online player count.</td></tr><tr><td>2</td><td>version</td><td>Shows the server version.</td></tr><tr><td>3</td><td>TPS</td><td>Shows the servers TPS.</td></tr><tr><td>4</td><td>DLC</td><td>Shows If Weapons or Arid DLC.</td></tr><tr><td>5</td><td>uptime</td><td>Shows the uptime of the server.</td></tr><tr><td>6</td><td>operatingSystem</td><td>Shows the servers operating system.</td></tr><tr><td>7</td><td>hasPassword</td><td>Shows if the server is password protected.</td></tr><tr><td>8</td><td>owner</td><td>Shows the owner of the server.</td></tr><tr><td>9</td><td>serverLocation</td><td>Shows the server location.</td></tr><tr><td>10</td><td>responseTimeMs</td><td>Shows the response time (Ms).</td></tr><tr><td>11</td><td>globalPlayers</td><td>Shows the number of players on stormworks.</td></tr><tr><td>12</td><td>logo</td><td>Shows the server logo in the embed.</td></tr></tbody></table>

## Server out of date

<mark style="color:blue;">Server Out Of Date</mark>\
If your server is out of date the status embed will look like this, You will also get a DM if they are enabled as shown in the alert embed example.

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2F9gCVAzkioSwtFHN6Zc3P%2Fswoutofdatemsg.png?alt=media&#x26;token=b4fd7ca1-d585-4ab3-b512-a8f124a12aa9" alt=""><figcaption></figcaption></figure></div>

## Ping

<mark style="color:blue;">PING</mark> - Get the ping of a server from all over the world.\
All users can use the <mark style="color:$warning;">/ping</mark> command.

<div align="left"><figure><img src="https://3240897265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCMf8TjcRclW7vjlT5xle%2Fuploads%2FC4Flx0cPgwzLa2TnLxrh%2Fswglobalpinginfo.png?alt=media&#x26;token=62ce9c98-cf19-4ca4-92b3-c51e3dcfefa5" alt=""><figcaption></figcaption></figure></div>

## Bot permissions

These are the bot's permissions:

* Read Messages - Needed to read messages in server.
* Send Messages - Needed to send messages in server.
* Manage Messages - Needed to send & delete its own message in the channel specified.
* Embed Links - Needed to embed links within the status embed.
* Attach Files - Needed to attach files to status embed.
* Read Message History - Needed to read message history.
* Use External Emojis - Needed to access emojis used in the status embed.
* Add Reactions - Needed as we might implement something in the future.
* View Channel - Needed to view(see) channels.
