The Discord Faceit Hub Bot ships with a full-featured React admin dashboard served directly from the bot’s Express server. Every aspect of the bot — users, live matches, configuration, feature flags, and logs — is manageable from a single authenticated web interface without needing CLI access or direct Firestore edits.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/VasquezRivero92/Discord_Faceit/llms.txt
Use this file to discover all available pages before exploring further.
Access and Authentication
Navigate tohttps://your-domain/admin to open the panel. Unauthenticated requests redirect automatically to Discord OAuth2 at /auth/discord.
After Discord OAuth2 completes, the server verifies your role in Firestore. Only users with the admin or global_admin role are allowed to proceed. A signed JWT is issued and stored in two cookies — auth_token and admin_token — both configured httpOnly, scoped to secure when BASE_URL starts with https, and valid for 8 hours.
To grant a user admin access, open Firestore, find the document for that user’s Discord ID in the
faceit_users collection, and set the rol field to "admin" along with the servidor field containing their Discord guild ID. global_admin users can manage all guilds and are identified by a hardcoded Discord user ID in the auth route.global_admin users see a guild selector dropdown in the sidebar and can switch between all configured guilds. admin users are scoped to a single guild and see only their guild’s data.
Dashboard Tab
The landing tab gives an at-a-glance operational view of the bot:Total Linked Users
Count of all Discord/Faceit accounts linked in this guild.
Active Matches
Number of matches currently tracked in
faceit_active_matches.Bot Uptime
Process uptime in hours and minutes, pulled from
/api/admin/system.Hub Region
Hub region string fetched from Faceit API and stored in system info.
Tabs Reference
Users Tab
Users Tab
A searchable, paginated table (15 rows per page) of all linked Discord/Faceit accounts for the selected guild. Each row shows Discord ID, Faceit nickname, Faceit Player ID, status (
Verificado / Pendiente / Baneado), and linked-at timestamp.Filters: filter by status using the dropdown (All, Verificado, Pendiente, Baneado).Actions per row:- Unlink (
POST /api/admin/users/:discordId/unlink) — removes the account link and reverts Discord roles. - Manual Verify — opens a modal to link a Discord ID to a Faceit nickname manually via
POST /api/admin/users/verify. - Assign Role — opens a modal to assign a
levelrole (1–10) or aspecialclub role viaPOST /api/admin/users/:discordId/roles. - Admin Permissions — opens a modal to set the user’s web panel role (
usuario,admin, orglobal_admin) viaPOST /api/admin/users/:discordId/admin-role.
- Export Backup (
GET /api/admin/users/backup) — downloads a dated JSON file of all user records. - Import Backup (
POST /api/admin/users/restore) — restores or merges users from a previously exported JSON file. - Sync All (
POST /api/admin/users/sync-all) — triggers a full re-sync of all users against the Faceit API, updating ELO and roles.
Matches Tab
Matches Tab
A live table of all active matches tracked in Firestore (
faceit_active_matches). Each row shows match ID, Team A vs Team B, map, server location, and elapsed time since start.Matches running longer than 60 minutes are highlighted as potentially stuck. Click Force Cleanup per row to call POST /api/admin/matches/:matchId/cleanup, which deletes voice channels and removes the match from Firestore.Match History Tab
Match History Tab
A full historical record of completed matches loaded from
GET /api/admin/matches/history. The table displays date/time, match ID (linked to the Faceit room page for non-Mixton matches), the two faction names with final scores, map, and server location. Roster nicknames for each faction are shown inline below the score.Leaderboard Tab
Leaderboard Tab
Displays the hub season leaderboard fetched from the Faceit API via
/api/admin/leaderboard. Columns: rank position, Faceit nickname, skill level, and hub points. Data is guild-scoped using faceitLeaderboardId from the bot config.Stats Tab
Stats Tab
Search any Faceit player by nickname. The panel calls
GET /api/admin/stats/:nickname and renders their profile card showing:- Faceit level and ELO
- K/D ratio and win rate
- Total matches played
- Last 10 match results (W/L form strip)
Support Tab
Support Tab
Lists all open support call requests raised by players (via the in-Discord support panel). Each entry shows the requesting player, timestamp, and status. Admins can mark calls as resolved, which removes them from the queue and notifies the player.
Templates Tab
Templates Tab
Edit the two message templates used by the bot:Welcome DM — the embed sent to new members who link their Faceit account. Editable fields: title, description body, and HEX color.Support Panel Message — the embed posted in the support channel for admin call alerts. Same editable fields.Changes are saved via
POST /api/admin/messages and take effect on the next triggered event.Config Tab
Config Tab
Edit all bot settings for the selected guild. Changes are persisted to Firestore via
POST /api/admin/guilds/:guildId/settings and override environment variable defaults.| Field | Description |
|---|---|
discordGuildId | Discord server (guild) ID |
discordLinkChannelId | Channel where /verificar_fc link messages are posted |
discordMatchesChannelId | Channel for match announcement embeds |
discordRolesChannelId | Channel for role assignment notifications |
discordStatusChannelId | Channel for LATAM server status embeds |
discordWaitingRoomChannelId | Voice channel ID used as parent for match voice channels |
discordAdminAlertsChannelId | Channel for admin/support alert pings |
discordSupportChannelId | Channel hosting the support panel |
faceitHubId | UUID of the Faceit Hub to monitor |
faceitLeaderboardId | Leaderboard ID for /leaderboard command |
adminRoleName | Discord role name treated as admin (default: ADMIN) |
matchTimeoutMinutes | Minutes after which a stuck match is auto-cleaned (default: 120) |
Features Tab
Features Tab
Full list of every feature flag with a toggle switch. Each toggle calls
POST /api/admin/features/:key?guildId=... with { "enabled": true/false }. Changes are guild-scoped and take effect within 30 seconds (the in-memory cache TTL). See the Feature Flags reference for the complete flag list.Messages Tab
Messages Tab
Broadcast a direct message (DM) to linked users. You can send to a specific user (search by Faceit nickname to select a target) or to all verified users at once via
POST /api/admin/broadcast. Mass broadcasts run in the background and a toast notification confirms the send was initiated.Simulator Tab
Simulator Tab
Send a simulated Faceit webhook event to the bot’s own
/webhook/faceit endpoint without needing a real Faceit Hub match. Select an event type and configure match details:- Event types:
match_status_configuring,match_status_starting,match_status_finished,match_status_cancelled - Fields: Match ID, map (
de_mirage, etc.), Team A name, Team B name - For
finishedevents: winner faction and score (A–B)
POST /api/admin/simulate-webhook and the bot processes it exactly as a real webhook.Logs Tab
Logs Tab
Real-time console log viewer. Logs are fetched from
Each entry shows a timestamp, level badge, and message. The log list is sourced from Firestore log entries written by the bot’s
/api/admin/logs every 4 seconds when this tab is active (other tabs use the standard 30-second poll interval). Filter by level using the dropdown:| Level | Color | Meaning |
|---|---|---|
info | Blue | Routine operations |
warn | Yellow | Non-critical warnings |
error | Red | Errors requiring attention |
success | Green | Completed actions |
logger utility.