# Activity tracking

> Count Discord messages and invites per member with Based, without storing message text, and show message and invite leaderboards.

URL: https://www.jalkarna.in/based/docs/activity-tracking/  
Last updated: 2026-11-16

Activity tracking counts how many messages each member sends and, optionally, which invite each new member used. It is off by default. Message text is never saved, only counts.

Use it for leaderboards and for giveaway requirements. `/messages` and `/invites` show one member's numbers, and `/topmessages` and `/topinvites` show leaderboards over a chosen period. **Statistics visibility** decides who can see them.

Invite tracking needs **Manage Server** so Based can read your server's invites. If counts look off after you created or deleted invites, run `/syncinvites`. Background reading: [how invite tracking works](https://www.jalkarna.in/based/learn/how-discord-invite-tracking-works/).

## Settings
Change these in the [dashboard](https://www.jalkarna.in/based/dashboard/) or with `/setup` in Discord. They apply to one server at a time.

| Setting | Default | What it does |
|---|---|---|
| Enabled | Off | Turn this feature on for this server. |
| Count messages | On | Count how many messages each member sends. Message text is never saved. |
| Count invites | Off | Track which invite each new member used. Based needs Manage Server for this. |
| Allowed channels | Not set | Leave empty to let Based work in every channel it can see. |
| Excluded channels | Not set | Activity in these channels isn't counted. |
| Statistics visibility | Members see their own activity | Who can see member activity and leaderboards. |

## Permissions Based needs
For this module Based's role needs: **View Channel**. See [permissions](https://www.jalkarna.in/based/docs/permissions/) for how to grant them only where they are needed.

## Commands
Every command works as a slash command and with the text prefix (default `.`), so `/syncinvites` and `.syncinvites` do the same thing.

### /syncinvites
Refresh this server's tracked invite cache.

- Usage: `/syncinvites`
- Who can use it: Members with Manage Server, in servers only

### /messages
Show a member's tracked message activity.

- Usage: `/messages [user] [duration]`
- `user`: Member whose activity to display
- `duration`: Timeframe, such as 24h, 7d, 30d, or lifetime
- Who can use it: Anyone who can use the command, in servers only

### /invites
Show a member's tracked server invites.

- Usage: `/invites [user] [duration]`
- `user`: Member whose activity to display
- `duration`: Timeframe, such as 24h, 7d, 30d, or lifetime
- Who can use it: Anyone who can use the command, in servers only

### /topmessages
Show this server's message activity leaderboard.

- Usage: `/topmessages [duration]`
- `duration`: Leaderboard timeframe
- Who can use it: Anyone who can use the command, in servers only

### /topinvites
Show this server's invite leaderboard.

- Usage: `/topinvites [duration]`
- `duration`: Leaderboard timeframe
- Who can use it: Anyone who can use the command, in servers only

