> For the complete documentation index, see [llms.txt](https://docs.tworst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tworst.com/getting-started-installation/admin-menu/admin-menu/discord-bot.md).

# Discord Bot

The **Tworst Admin Bot** lets your staff run admin actions and receive live logs directly from Discord. It connects to your server through Tworst Cloud and enforces the **same roles and permissions** as the in-game menu.

{% hint style="info" %}
The bot is **open-source and self-hosted** — you run it on your own machine/VPS and connect it to **your own** Discord bot application. You're in full control of the token and hosting.
{% endhint %}

***

## What It Does

* **Remote player admin** — kick, ban, warn, jail, freeze, heal, revive, give items/money, and more (via slash commands)
* **Server info** — live status, online player list
* **Announcements** — broadcast to the server from Discord
* **Bans & whitelist** — manage bans and whitelist entries
* **Event logging** — post event announcements to your channels
* **Role sync (optional)** — mirror in-game staff roles to Discord roles, bidirectionally
* **5 languages** — EN, TR, DE, FR, ES

{% hint style="info" %}
**Ticket logging** is handled in-game via Discord webhooks (Admin Menu v1.0.3+), not by the bot. See [Admin Menu → Configuration](/getting-started-installation/admin-menu/admin-menu/configuration.md#shared-webhooks-lua).
{% endhint %}

***

## How It Connects

```
Discord  ──▶  Tworst Admin Bot  ──▶  Tworst Cloud  ──▶  Your FiveM server
                                                          (tw-adminmenu)
```

The bot talks to your server through the same Tworst Cloud uplink the web panel uses. Every action carries the Discord user's identity, so the server enforces **that user's in-game staff permissions** — there's no separate permission list to maintain.

***

## Prerequisites

| Requirement                      | Notes                                                                                                                                |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Node.js 20+**                  | Required to run the bot                                                                                                              |
| **A Discord application**        | Your own bot token (free, created at the Discord Developer Portal)                                                                   |
| **A paired Tworst Cloud server** | The bot uses your cloud credentials — set up the [Web Panel](/getting-started-installation/admin-menu/admin-menu/web-panel.md) first |
| **Hosting**                      | Any machine/VPS that can stay online 24/7                                                                                            |

{% hint style="info" %}
You download the bot's source code from its GitHub repository: [github.com/tworst46/twadminmenu\_bot](https://github.com/tworst46/twadminmenu_bot)
{% endhint %}

***

## Quick Links

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Setup</strong></td><td>Step-by-step self-host guide</td><td><a href="/pages/dRlyGDX58AKDsyej4BbU">/pages/dRlyGDX58AKDsyej4BbU</a></td></tr><tr><td><strong>Configuration</strong></td><td>Full .env reference</td><td><a href="/pages/OSIL6XFe0V7qOzxq3GEv">/pages/OSIL6XFe0V7qOzxq3GEv</a></td></tr><tr><td><strong>Commands</strong></td><td>All slash commands</td><td><a href="/pages/QEMrdrxL2MxmXk1tu7Vy">/pages/QEMrdrxL2MxmXk1tu7Vy</a></td></tr></tbody></table>
