Skip to content

Timed Roles

Timed roles let admins assign roles that expire automatically.

Commands

CommandDescription
/timedrole add <user> <role> <duration>Assign a timed role to a user
/timedrole remove <user> <role>Remove a timed role from a user
/timedrole listList all timed role assignments

Duration Format

Durations are specified as a human-readable string, for example:

  • 7d — 7 days
  • 24h — 24 hours
  • 30m — 30 minutes
  • 1w 2d — 1 week and 2 days

Supported units: w (weeks), d (days), h (hours), m (minutes), s (seconds).

How It Works

  1. A timed role is assigned to a user either manually via /timedrole add or automatically on join if configured
  2. The bot stores the assignment with an expiration timestamp in D1
  3. Every 5 minutes, the cron handler checks for expired assignments and removes the role
  4. An optional notification is sent to the configured channel when a role expires

New Member Auto-Roles

In the admin dashboard, the Timed Roles page lets you:

  • Add a timed role for a specific user and duration
  • Create a manual-assignment rule for a watched role
  • Create a new-member auto-role rule
  • Set an optional moderation log channel
  • View and remove active assignments