> ## Documentation Index
> Fetch the complete documentation index at: https://docs.falconbot.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Invite Logging Commands

> Track server invites, view inviter statistics, configure custom join/leave messages, and view leaderboards.

Track which member brought new users into your server, detect fake invites, and broadcast automated welcome announcements with template variables.

## Viewing Invite Stats

### invites

Displays the regular, fake, left, bonus, and total invite breakdown for yourself or a targeted member.

<CodeGroup>
  ```bash Syntax theme={null}
  -invites [user]
  ```

  ```bash Example theme={null}
  -invites @TopInviter
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="user">
    Optional member mention or user ID. If omitted, displays your own invite stats.
  </Accordion>

  <Accordion title="Slash command">
    You can also use `/invites [user]`.
  </Accordion>
</AccordionGroup>

***

### inviter

Look up who generated the invite code used by a specific member when joining.

<CodeGroup>
  ```bash Syntax theme={null}
  -inviter [user]
  ```

  ```bash Example theme={null}
  -inviter @NewMember
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="user">
    The member whose inviter you wish to inspect. Defaults to yourself if not specified.
  </Accordion>
</AccordionGroup>

***

### invited

Displays a paginated list of all server members currently credited to a user's invite link.

<CodeGroup>
  ```bash Syntax theme={null}
  -invited [user]
  ```

  ```bash Example theme={null}
  -invited @CommunityManager
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="user">
    Target user to inspect. Defaults to command author.
  </Accordion>
</AccordionGroup>

***

### inviteinfo

Displays the active invite URLs and codes generated by a member in the current guild.

<CodeGroup>
  ```bash Syntax theme={null}
  -inviteinfo [user]
  ```

  ```bash Example theme={null}
  -inviteinfo @Alex
  ```
</CodeGroup>

***

## Welcome & Leave Channels

### setjoinchannel

Designate the text channel where invite logging welcome cards and join announcements appear.

<Tip>
  The `message` parameter can be raw text or an **embed** with dynamic **variables**.
</Tip>

<CodeGroup>
  ```bash Syntax theme={null}
  -setjoinchannel (channel)
  ```

  ```bash Example theme={null}
  -setjoinchannel #welcome
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="channel">
    Channel mention (e.g. `#welcome`) or channel ID where join alerts will be dispatched.
  </Accordion>
</AccordionGroup>

***

### unsetwelcomechannel

Disables automated join welcome messages in the server.

<CodeGroup>
  ```bash Syntax theme={null}
  -unsetwelcomechannel
  ```

  ```bash Example theme={null}
  -unsetwelcomechannel
  ```
</CodeGroup>

***

### setleavechannel

Designate the channel where departure notices are logged when a member leaves the server.

<CodeGroup>
  ```bash Syntax theme={null}
  -setleavechannel (channel)
  ```

  ```bash Example theme={null}
  -setleavechannel #leave-logs
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="channel">
    Channel mention or ID for member departure notices.
  </Accordion>
</AccordionGroup>

***

### unsetleavechannel

Disables departure notices when members leave.

<CodeGroup>
  ```bash Syntax theme={null}
  -unsetleavechannel
  ```

  ```bash Example theme={null}
  -unsetleavechannel
  ```
</CodeGroup>

***

## Custom Message Formatting

### setjoinmessage

Format a dynamic welcome message using template variables.

<Tip>
  Use `-variables` to see all 18+ placeholders like `$member_mention`, `$inviter_mention`, and `$invites`!
</Tip>

<CodeGroup>
  ```bash Syntax theme={null}
  -setjoinmessage (message_text)
  ```

  ```bash Example theme={null}
  -setjoinmessage Welcome $member_mention to $guild_name! You were invited by $inviter_mention (now at $invites invites). We now have $member_count members!
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="message_text">
    The welcome text template containing variables like `$member_mention`, `$inviter_mention`, `$invites`, and `$guild_name`.
  </Accordion>
</AccordionGroup>

***

### setleavemessage

Customize the notice displayed when someone leaves the server.

<CodeGroup>
  ```bash Syntax theme={null}
  -setleavemessage (message_text)
  ```

  ```bash Example theme={null}
  -setleavemessage Goodbye $member_name! They were originally invited by $inviter_name.
  ```
</CodeGroup>

***

### variables

Lists all dynamic placeholders available for custom welcome and leave messages.

<CodeGroup>
  ```bash Syntax theme={null}
  -variables
  ```

  ```bash Example theme={null}
  -variables
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="$member_count">
    Total server member count.
  </Accordion>

  <Accordion title="$ordinal_member_count">
    Ordinal member number (e.g. `1,250th`).
  </Accordion>

  <Accordion title="$inviter_name / $inviter_mention">
    Username or clickable mention of the inviter.
  </Accordion>

  <Accordion title="$member_name / $member_mention">
    Username or clickable mention of the joining member.
  </Accordion>

  <Accordion title="$invites">
    Inviter's total invite count.
  </Accordion>

  <Accordion title="$guild_name">
    Name of your Discord server.
  </Accordion>

  <Accordion title="Full Variables Reference">
    For the complete list with output examples and templates, see the [Template Variables reference](/commands/variables).
  </Accordion>

  <Accordion title="Aliases">
    You can also use `-invitevariables` or `-vars`.
  </Accordion>
</AccordionGroup>

***

### testmessage

Preview how your custom template renders without waiting for an actual member to join.

<CodeGroup>
  ```bash Syntax theme={null}
  -testmessage (message_text)
  ```

  ```bash Example theme={null}
  -testmessage Welcome $member_mention to $guild_name! Invited by $inviter_mention.
  ```
</CodeGroup>

***

## Managing Invite Counts

### addinvites

Manually grant bonus invites to a user (e.g. for event prizes or staff rewards).

<CodeGroup>
  ```bash Syntax theme={null}
  -addinvites (user) (count)
  ```

  ```bash Example theme={null}
  -addinvites @Helper 5
  ```
</CodeGroup>

<AccordionGroup>
  <Accordion title="user">
    Target member to grant bonus invites to.
  </Accordion>

  <Accordion title="count">
    The integer number of invites to add.
  </Accordion>
</AccordionGroup>

***

### removeinvites

Deduct invites from a user.

<CodeGroup>
  ```bash Syntax theme={null}
  -removeinvites (user) (count)
  ```

  ```bash Example theme={null}
  -removeinvites @Spammer 10
  ```
</CodeGroup>

***

### leaderboard invites

Displays the top 10 inviters in the server with rankings.

<CodeGroup>
  ```bash Syntax theme={null}
  -leaderboard invites
  ```

  ```bash Example theme={null}
  -leaderboard invites
  ```
</CodeGroup>

***

### clearinvites

Reset invite counts for a specific user or wipe the entire server's invite records.

<Warning>
  Running `-clearinvites` without specifying a user will permanently purge all invite records for the entire guild.
</Warning>

<CodeGroup>
  ```bash Syntax theme={null}
  -clearinvites [user]
  ```

  ```bash Example theme={null}
  -clearinvites @Cheater
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.