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.
/sincronizar_fc lets any verified member pull their latest Faceit data on demand and immediately re-apply the correct level role in Discord. It is useful after a rank-up or rank-down that the bot’s automatic background sync may not yet have processed, or after a server restart that cleared the in-memory playerCache. The command hits the Faceit Data API v4 directly using the stored player_id, so the nickname does not need to be re-entered.
Syntax
Feature Flag
Guarded by thecommand_sincronizar feature flag scoped to the guild. When the flag is false, the bot replies with an ephemeral ❌ Este comando está desactivado por el administrador. and performs no further action.
Prerequisites
- You must have already linked your Faceit account using
/verificar_fc. The command reads yourfaceit_player_idfrom thefaceit_usersFirestore collection viadb.getFaceitIdByDiscordId(). If no link is found it returns an error directing you to run/verificar_fcfirst. FACEIT_API_KEYmust be configured in the environment. If it is absent or starts with the placeholder prefixTU_, the command fails immediately.
Behavior
- Feature flag check — aborts early if
command_sincronizaris disabled for the guild. - Link lookup — calls
db.getFaceitIdByDiscordId(discordId, guildId). Returns an error if no link exists. - Faceit API call — calls
fetchFaceitPlayerById(faceitPlayerId)to retrieve the current player object. Readsskill_levelviagetPlayerSkillLevel(player)and parsesplayer.games.cs2.faceit_elo(with acsgofallback). - Role sync — calls
syncMemberLevelRole(guild, discordId, skillLevel)which removes any stale level roles (1–10) and adds the current one. - Cache update — refreshes
playerCacheusing the caller’sdiscordIdas the key with the latest{ faceitId, nickname, level }data. - Audit log — writes an
infolog entry recording the manual sync and the resolved level.
Response
The bot replies with an ephemeral embed containing your up-to-date details:Error Reference
| Condition | Error message |
|---|---|
command_sincronizar flag is false | ❌ Este comando está desactivado por el administrador. |
FACEIT_API_KEY missing/placeholder | ❌ El administrador no ha configurado la API Key de Faceit. |
| No linked account found | ❌ No tienes una cuenta de Faceit vinculada. Usa /verificar_fc primero para vincular tu cuenta. |
| No active CS2/CS:GO level on profile | ❌ No se pudo encontrar un nivel activo en Faceit para el perfil **NickName**. |
| Unexpected API or DB error | ❌ Ocurrió un error al intentar sincronizar tu cuenta: <details> |
If you changed your Faceit nickname, this command will not update the stored nickname in Firestore. Use
/desvincular_fc (admin) followed by a fresh /verificar_fc to update the nickname binding.