Security ​
- The bot token stays on the server. It is read from the convar
discord_bot_tokenand never leaves the server. Useset, notsetr:setrreplicates the value to every client. The same goes fordiscord_webhook_<name>(see Common concepts → Secrets). config.luais server-only. It is not a shared script; onlyConfig.Presenceis sent to clients.- No client event can make the bot do anything. The only net event is a client asking for its own profile, rate-limited (see Events → Net events). The baseevents death events are only listened to while the death log is on.
- The client profile is for display. Decide permissions on the server with
HasRole(source, …); a client can claim whatever it likes. - Webhook urls are only accepted for Discord's hosts, in convars,
Config.Logs.channelsand the webhook exports. - Mentions are off by default. Nothing pings anyone unless a message sets
mentions = trueor its ownallowed_mentions, so player-written text can never@everyone.EscapeMarkdownmakes player text inert (no formatting, mentions or links). The chat bridge, the built-in logs and the status message escape player names and text. - Bare role names only resolve in your own guilds (main and
Config.Guilds). A partner server the bot was invited to cannot grant "Admin" on yours by having a role with that name. See Guilds & discovery → Names. - The whitelist fails closed. A role it cannot resolve refuses every connection, and an unreachable Discord refuses
too unless
failOpenis on. - Slash command
permissionsare only a default. Server admins can change who sees a command in Discord. Check roles in the handler when a command is sensitive (see Slash commands → Who may use it).
Every resource can use the bot
Exports are callable by every resource on your server. That is the point, but it also means a resource you do not trust could ban through your bot. Give the bot only the Discord permissions you actually use, and keep its role below the roles it must never touch.