- Fougerite Compatibility
- 1.9.2 or +
- Plugin's Engine
- C# (Modules)
Discord BOT API
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Complete bridge between Rust Legacy (Fougerite) and Discord
Preview
Real integration working on server + Discord
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Description
Discord BOT API is a modular communication system that connects your Rust Legacy server with Discord in real time.
It allows commands, private messages, broadcasts, and full cross-plugin integration through a simple API system.
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
- Two-way communication — send and receive commands between Discord and server
- Account linking system — securely link SteamID with Discord user
- Private DM system — send direct messages to players via Discord
- Global broadcast — send messages to all linked users instantly
- Channel messaging — send messages directly to any Discord channel
- Cross-plugin API — other plugins can interact with Discord easily
- Persistent linking — accounts saved and loaded automatically
- Lightweight polling system — efficient and stable (2s default)
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Included Example Plugin
This release includes a ready-to-use example plugin called:
sender.js
This file demonstrates how to use the Discord API from another plugin.
It contains working commands such as:
- /islinked — check if player is linked
- /senddm — send a Discord DM
- /alertall — broadcast to all linked users
- /sendchannel — send message to Discord channel
- /discordid — get Discord ID
- /unlinkdiscord — unlink account
This plugin is meant as a base template for developers.
You can copy, modify and integrate it into your own plugins easily.
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Available via Plugin.SendMessage
| Action | Description |
|---|---|
| isLinked | Check if SteamID is linked to Discord |
| sendDM | Send private message to linked user |
| broadcastDM | Send message to ALL linked users |
| sendChannelMessage | Send message to specific Discord channel |
| getDiscordId | Get Discord user ID from SteamID |
| unlink | Unlink Discord account |
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Linking System
- User runs /discord in Discord channel
- Bot sends unique code via DM
- User types /discord CODE in Rust
- Account linked successfully
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Edit settings.json:
{
"token": "YOUR_BOT_TOKEN",
"channel_commands": "CHANNEL_ID",
"command_prefix": "/",
"poll_interval": 2000
}
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Installation
- Place the DiscordBOT module in Fougerite Modules
- Place sender.js inside JsPlugins folder
- Configure settings.json
- Restart server
- Invite your bot to Discord server
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Powerful. Modular. Developer-friendly.