RoxiReports Discord Bridge
The Discord bridge is optional. When enabled, the bundled bot can use Discord roles for staff access, create report channels, mirror report chat both ways, save transcripts, and expose slash commands for setup and account linking.
What it can do
- Link Discord users to their in-game identifiers with
/reportsconnect. - Use Discord roles as staff permissions alongside ACE and framework groups.
- Create private report channels and keep the channel mapping in SQL.
- Mirror in-game report messages, edits, deletes, evidence, and staff actions into Discord.
- Mirror Discord staff replies back into the in-game report conversation.
- React to Discord replies with a check mark when they were saved in-game, or an X when the reply was rejected.
- Close reports with a transcript summary, then delete the channel only when the report is deleted forever.
- Publish a configurable top-10 leaderboard with navigation buttons.
Bot config
The bot reads config/bot-config.js. Keep the token there, or load it from your host environment before release.
const BotConfig = {
Enabled: true,
Token: 'YOUR_BOT_TOKEN',
GuildId: 'YOUR_GUILD_ID',
MainColor: '#8b5cf6',
ReportChannels: {
Enabled: true,
ParentName: 'Open Reports',
MaxChannelsPerCategory: 50,
SummaryChannelId: '1519319705062735935',
DeleteChannelOnReportDelete: true,
Transcript: true,
MentionSupportRoles: true,
ChannelName: 'report-{id}'
},
Buttons: {
Claim: 'Claim',
Close: 'Close',
Archive: 'Archive',
Reopen: 'Reopen',
Screenshot: 'Screenshot',
DeleteForever: 'Delete Forever'
}
}
Do not put bot tokens in shared, client, or NUI files. The website does not need the report bot token.
Slash commands
/reportsconnect- links your Discord account to your online in-game player./reportssetup- creates the report category structure when the caller has an admin role./reportsaddsupportroleand/reportsremovesupportrole- manage support roles used by the report bot./reportssupportroles- lists configured support roles./reportcategorydiscord- links an in-game report category to a Discord parent category./reportcategories- lists report categories and their Discord mapping.
Staff access
ServerConfig.Permissions = {
Ace = { 'group.admin', 'group.mod' },
Discord = {
'1515992647557189652',
'1515992840738701322',
'1515993041737875527',
'1515993162219524096'
},
Qb = { admin = true, mod = true },
Esx = { admin = true, mod = true }
}
Discord roles are checked server-side through the bot bridge. ACE and framework groups can stay enabled at the same time.
How access is resolved
Aceis checked first. Use it when your staff access is managed through server.cfg or a permissions resource.Discordis checked next. Use it when your Discord staff roles should unlock RoxiReports staff tools in-game.QbandEsxare checked from the active framework. Use them if your staff groups already live inside your framework.
Report categories
/reportssetup creates the first category. When the active category reaches the configured channel limit, the bot creates the next category and stores it in SQL. Closed reports keep their channel for transcript and review. Only Delete Forever removes the report channel.
Staff tags
ServerConfig.StaffTags = {
{ type = 'discord', value = '1515992647557189652', position = 0, label = 'Management', color = '#a855f7' },
{ type = 'discord', value = '1515992840738701322', position = 1, label = 'Admin', color = '#ef4444' },
{ type = 'ace', value = 'group.admin', position = 5, label = 'Admin', color = '#ef4444' },
{ type = 'qb', value = 'mod', position = 10, label = 'Moderator', color = '#22c55e' },
{ type = 'esx', value = 'admin', position = 10, label = 'Admin', color = '#ef4444' }
}
Lower position wins. If a player has QB admin and Discord Management, the Management tag appears when its position is lower.
In-game staff player view
/reportsuserview lets an admin open the player center with /reports for testing. It hides the staff workspace from that admin's in-game view and makes in-game replies from that mode appear as user messages. Discord replies still use the real staff tag from Discord roles.
Avatars in chat
The bridge stores the Discord avatar during /reportsconnect and uses it for staff messages in-game. If you want a fallback, enable Steam avatars in ServerConfig.Avatars and add a Steam Web API key. If no avatar is available, the UI keeps the normal fallback icon.
Messages and placeholders
Report embeds, summaries, leaderboard text, and button labels can be adjusted from bot-config.js.
{reportid}- report id.{mainplayersrc}- in-game source id of the reporter.{reporter}- reporter name.{category},{priority},{title},{description}- report data.{nearby}- nearby player names and ids at report creation.{identifiers}- safe player identifiers, without IP.{mentions}- configured Discord staff role mentions.
Useful Discord buttons
Claim- claims the report once. If claimed in-game or Discord, both sides stop offering claim again.Close- closes the report and sends a transcript summary to the configured log channel.Archive- archives the report without deleting the Discord channel.Reopen- reopens a closed report and reactivates the channel.Screenshot- requests configured screenshot capture.Delete Forever- permanently deletes the report and removes its Discord channel.
