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.
/desvincular_fc gives server administrators a clean way to sever the bond between a Discord member and their Faceit account. It calls db.unlinkAccount() to remove the record from the faceit_users Firestore collection and then calls removeAllFaceitRoles() to strip every Faceit-managed role — all ten level roles and any special club roles — from the target member. The command is intentionally public so the action is visible to the moderation team.
Syntax
Parameters
The Discord member to unlink. Must be a member of the current guild. If the member has already left the server the role-removal step is skipped silently, but the Firestore record is still deleted.
Required Permissions
The caller must satisfy at least one of the following:- Hold a Discord role whose name matches
ADMIN_ROLE_NAME(default:ADMIN). The check is case-insensitive and performed viacheckIsAdmin(). - Have the Discord
Administratorpermission on the server.
❌ No tienes permisos para usar este comando. Se requiere el rol **ADMIN**. error.
Feature Flag
Guarded by thecommand_desvincular feature flag scoped to the guild. When the flag is false, the bot returns an ephemeral error and performs no database changes.
Channel Restriction
Like/verificar_fc, this command must be run inside the configured link channel (DISCORD_LINK_CHANNEL_ID / settings.discordLinkChannelId). Comma-separated multi-channel values are supported. Attempting to use it in another channel produces an ephemeral error listing the allowed channels by mention.
Behavior
- Feature flag check — checked first, before permission or channel validation.
- Channel guard — validates that the command was issued in an allowed link channel.
- Permission check — calls
checkIsAdmin(member, guild). - Target resolution — reads
interaction.options.getUser('usuario')and fetches the correspondingGuildMemberobject. - Unlink — calls
db.unlinkAccount(targetUserId, guildId). This removes the Firestore document fromfaceit_users. - Role removal — if the target member is still in the server, calls
removeAllFaceitRoles(targetMember, guild). This iterates and removes all level roles (Level 1–10) as well as any configured club/special roles. The number of roles removed is logged atINFOlevel. - Audit log — writes a
warnlog entry recording the admin who performed the action and the target user’s tag.
Response
On success the bot sends a public reply (ephemeral: false) in the link channel:
Error Reference
| Condition | Error message |
|---|---|
command_desvincular flag is false | ❌ Este comando está desactivado por el administrador. |
| Link channel not configured | ❌ El canal de vinculación no está configurado por el administrador. |
| Command run outside allowed channel | ❌ Este comando solo se puede usar en el canal de vinculación: #channel. |
| Caller lacks admin permissions | ❌ No tienes permisos para usar este comando. Se requiere el rol **ADMIN**. |
| Unexpected DB or Discord API error | ❌ Ocurrió un error al intentar desvincular al usuario: <details> |
If the target user has already left the guild,
guild.members.fetch() returns null. The Firestore unlink still happens, but the role-removal step is skipped since there is no guild member object to act on.