DiscordBOT + API

DiscordBOT + API 7.2.1

No permission to download

Update — Discord DM Embed Support

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

  • Added advanced Discord DM messaging support

    The DiscordBOT API can now send messages directly to linked users through Discord private messages (DMs).
  • sendDM now supports BOTH plain text and embeds

    The system automatically detects if the payload is:


    • Normal text message
    • Discord embed JSON
    • Raw Discord API payload
  • Automatic JSON detection

    No additional actions are required anymore.

    The same

    sendDM
    API now intelligently handles both message types automatically.

  • Perfect for advanced server systems


    • Raid alerts
    • Ban/kick notices
    • Reports
    • Staff moderation systems
    • Custom plugin notifications

  • sender.js updated with examples

    The included
    sender.js
    now contains fully working examples for:


    • Sending normal DM messages
    • Sending Discord embeds via DM
    • JSON payload usage
    • Advanced Discord formatting
    • Plugin.SendMessage integration
    • Ready-to-use implementation examples
  • Easy to integrate into existing plugins

    Developers can directly copy the sender.js examples and instantly add private Discord notifications into their own systems.


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

DM Embed Preview

1778093437391.png


Example of a private Discord embed sent directly to a linked player account.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Update — Improved Plugin-Based Interaction Replies

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

  • Global Slash Command Hooks

    All Discord slash commands now trigger:

    On_DiscordCommand()

    This includes:

    • Built-in commands
    • Dynamic commands
    • Future registered commands​
  • Built-in Commands Are Now Hookable

    Commands like:


    • /announce
    • /ban
    • /kick
    • /airdrop
    • /unban

    can now be intercepted directly from external JS plugins.
  • Direct Discord Interaction Replies

    Added:

    interactionReply

    JS plugins can now send:


    • Private replies
    • Public replies
    • Validation errors
    • Dynamic responses
    • Fully custom interaction messages​
  • Improved Dynamic Command Architecture

    Dynamic commands now:


    • Wait briefly for plugin replies
    • Support fallback responses
    • Prevent race conditions
    • Allow external reply control​
  • Automatic Double-Reply Protection

    The system now tracks interaction tokens internally to prevent:


    • Duplicate Discord replies
    • Multiple followups
    • Invalid interaction states​
  • Unified Command Notification Flow

    Static commands and dynamically registered commands now share the same plugin event architecture.
  • Advanced Metadata Exposure

    Plugins now receive advanced Discord interaction data:



    • command
    • userid
    • username
    • globalName
    • discriminator
    • mention
    • avatar/avatarUrl
    • guildId
    • channelId
    • interactionId
    • appId
    • roles
    • admin state
    • slash command options
    • interaction token
  • Updated Sender.js Example

    The included example now demonstrates:


    • Registering slash commands
    • Admin-only commands
    • Role-restricted commands
    • Dynamic option parsing
    • Custom Discord replies
    • Validation systems
    • Broadcasting to Rust server
    • interactionReply usage
    • Advanced metadata handling​
  • New Example Command

    /dretaxgay

    Demonstrates:


    • Option parsing
    • Validation checks
    • Custom interaction replies
    • Role/admin access
    • Discord ↔ Rust communication
    • Advanced interaction handling​
  • Better Extensibility For Developers

    External Fougerite plugins can now create advanced Discord systems without modifying the core C# module.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


DiscordBOT v7.2


Enhanced slash command architecture, plugin interaction replies
& advanced JS integration



Discord UserInfo API

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


Fetch linked Discord user information directly from JS plugins including:
roles, avatar, guild data, nicknames, timeout state and more.



1778088242706.png


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Features

  • Get Discord username
  • Get global display name
  • Get mention string
  • Get Discord ID
  • Get avatar URL
  • Get guild ID
  • Get nickname
  • Get join date
  • Get timeout status
  • Get mute/deaf state
  • Get all role IDs
  • Async non-blocking requests
  • Safe for Rust Legacy servers


Returned Data

username

globalname

mention

userid

avatarurl

guildid

nick

joinedat

pending

mute

deaf

timeoutuntil

roles


All in the Sender.js example

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Rust Legacy • Fougerite • Discord Gateway API

Discord BOT Bridge (Gateway + Slash Commands)

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Advanced Discord integration for Rust Legacy (Fougerite)


Preview

Examples of Discord ↔ Server interaction



1777929605079.png

1777929671637.png

1777930839876.png

1777931034687.png


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


Description

Discord BOT Bridge is a powerful and optimized system that connects your Rust Legacy server directly with Discord using the official Gateway API.

This version removes old command channel limitations and introduces modern slash commands, admin tools, and a full real-time chat bridge between Discord and the game.



▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


✨ Features

  • Slash Commands — fully integrated Discord commands
  • Admin Commands — ban, unban, kick, airdrop, announce
  • Real-time Chat Bridge — Discord ↔ Server communication
  • Auto Message Cleanup — deletes user messages and reposts as embed
  • Embed System — clean and modern Discord messages
  • Avatar Support — shows Discord user avatars in chat
  • Account Linking — link Discord with SteamID
  • DM System — send messages directly to users
  • Custom Commands — dynamic command responses
  • Bot Presence Control — playing / watching / streaming


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


⚙ Slash Commands

  • /players → Show online players
  • /status → Server status (Admin only)
  • /discord → Link your Discord account


Admin Commands

  • /ban <name/steamid>
  • /kick <name/steamid>
  • /unban <type> <value>
  • /airdrop <amount>
  • /announce <message>


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


Discord Chat Bridge

You can configure a Discord channel to act as in-game chat:

• Messages sent in Discord appear in-game
• Messages from players appear in Discord
• User messages are automatically deleted
• Reposted as clean embeds with avatar

This creates a seamless global chat between Discord and your server.



▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


⚙ Bot Control (In-Game)

  • /botstatus → Custom presence
  • /botonline → Set bot online
  • /sendchannel → Send message to Discord
  • /embed → Send advanced embed
  • /alertall → Send DM to all linked users


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


⚙ How It Works

• Uses Discord Gateway (WebSocket) for real-time events
• HTTP API for sending messages and embeds
• No webhook dependency required
• Fully async and optimized
• Works globally (no command channel needed)

Everything is designed for performance, flexibility, and modern Discord integration.



▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


Installation

  1. Create a folder named DiscordBOT
  2. Place the .dll inside:

    rust_server/Save/DiscordBOT/
  3. Edit settings.json
  4. Add your Bot Token and Chat Channel ID
  5. Start or reload the server


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


In-Game Discord Control (JS Sender)

This system allows you to control the Discord bot directly from the game using simple commands.

You can change bot status, send embeds, messages, alerts and more in real-time.



Bot Presence Commands

  • /botonline → Shows server name + players online
  • /botplaying <text> → Sets "Playing" status
  • /botwatching <text> → Sets "Watching" status
  • /botstream <text> → Sets "Streaming" status (Twitch)


Discord Messaging

  • /sendchannel <message> → Send message to Discord channel
  • /embed → Send advanced embed with server info
  • /alertall <message> → Send DM to all linked users


⚙ Utility Commands

  • /addcmd <name> <message> → Create custom Discord command
  • /senddm <message> → Send DM to yourself
  • /islinked → Check Discord link status
  • /unlinkdiscord → Unlink your Discord account


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


⚙ Example Usage


/botonline
→ RustServer | 45 players

/botwatching players farming
→ Watching players farming

/botplaying Rust Legacy
→ Playing Rust Legacy

/botstream Live Raid
→ Streaming Live Raid

/sendchannel Server restart in 10 minutes
→ Message sent to Discord

/alertall Raid incoming
→ DM sent to all linked users





▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Discord Bot Update: JSON Fixes & Stability Improvements



Changelog

  • Improved JSON handling
  • Embed support now works correctly
  • Removed unnecessary Loom usage (better performance)
  • Improved Discord API stability
  • General bug fixes



Details

This update focuses on improving how the bot handles JSON data and Discord API responses.

Unnecessary use of Loom has been removed, improving performance and reducing overhead.

The system is now more stable and reliable.


✔ No configuration changes required

Discord Embed Support

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Rich embed messages are now supported in the Sender API



1777734163581.png



▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

✨ Description

You can now send fully customized Discord embeds directly from your Rust Legacy server using the Sender plugin.
This includes titles, descriptions, fields, images, thumbnails, colors and more — all in real time.


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Features


  • []Full embed support — titles, descriptions, colors, fields
    []Images & thumbnails — display visuals directly in Discord
    []Dynamic data — use player name, SteamID, server info
    []Webhook-style messages — clean and modern look
  • Easy integration — works directly from sender.js

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

⚙ How to use

Use the example command included in sender.js.
Simply configure your Discord bot and replace the channelid with your own channel ID.



  • []Open sender.js
    []Use the embed example command
    []Set your channelid
    []Execute the command in-game

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Example

The included example demonstrates a fully styled embed with player data, server info, and images — exactly like shown in the preview above.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬



Update: Dynamic Command System

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

✨ New Feature

You can now create Discord commands directly from the server using the new dynamic command system.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

⚙ How it works

  • /addcmd <name> <message> — create a new Discord command instantly
  • Command will be available in your Discord channel
  • No restart required

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Variables

You can use dynamic variables inside your command messages:

  • {author} — mentions the user
  • {userid} — Discord user ID

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Examples

CommandResult
/addcmd hello Hello {author}Mentions user with greeting
/addcmd id Your ID is {userid}Shows Discord ID


▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬