Abyssal
Home
Tools
Docs
Support
Dashboard
# AFK The AFK module tracks which members are away. Anyone can set a status with `/afk set` (with an optional reason, expiry and scope), the bot answers anyone who mentions an AFK member or replies to one of their messages with the reason and how long they have been away, and the status is cleared automatically when the member sends a message or runs a command (command clears can be turned off in `/afk preferences`). Admins can also view every current status from the dashboard and hide a status's reason in their server. ## Enabling Toggle the module on the Modules page of the dashboard, then configure it on the AFK Settings tab. ## Dashboard configuration - **AFK Statuses** page: lists every member currently marked AFK with their avatar, user ID, reason (or "No reason set"), time away, scope badge and ping count. Global statuses are view only; for statuses shown in this server, admins get a **Hide Reason** button (and **Restore Reason** to bring it back), which removes the reason from the mention reply and the welcome back in this server only. The page description lives behind the question mark icon next to the title. - **Settings** tab: **Reply When Mentioned** (direct mentions and replies to the AFK member; role pings, @everyone and @here never trigger replies), **Reply Cooldown** in minutes (0 replies on every mention), **Welcome Back Message** toggle, **Max Reason Length** (10 to 500), the **[AFK] Name Prefix** toggle, **Clear On Voice Join**, the **Pings While Away Digest** toggle and an **Exclusions** card with **Excluded Channels** and **Bypass Roles**. - **Formats** tab: customize the responses - **AFK Status Set** (`afk.afk.set`), the welcome back reply (`afk.afk.removed`), the mention reply (`afk.afk.status`), the cleared reply (`afk.afk.cleared`), the expiry DM (`afk.afk.expired`) and the digest DM (`afk.afk.digest`). Variables include `{reason}`, `{reason.segment}`, `{duration}`, `{afk.since.relative}`, `{scope}`, `{expires}`, `{pings}`, `{ping_count}` and `{user.mention}`. ## Commands ### `/afk` Manage your AFK status. Running any other command also clears your AFK status, just like sending a message does. #### `/afk set` Set yourself as AFK with an optional reason. Running it again updates the reason. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `reason` | Text | Optional | The reason for being AFK - max length 200 (the server's Max Reason Length setting). | | `expiry` | Text | Optional | Auto-clear your status after this time, e.g. 90m, 2h, 1d. | | `scope` | Text | Optional | Where this status applies - Choices: This server only, Every server (global). | **Example:** `/afk set reason:Sleeping expiry:2h` #### `/afk clear` Remove your AFK status right now. In a server it clears this server's status; in DMs it clears your global status. #### `/afk preferences` Your personal AFK preferences, always ephemeral: **Expiry DMs**, **Pings Digest DMs**, **Voice Join Clears** (Follow Servers or Never), **Command Use Clears** (whether running a command clears your status) and **Servers That Do Not Clear Your Status** (an ignore list of up to 10 servers). ## How it works / Key flows - `/afk set` stores the reason and timestamp per server, or on a global entry when the scope is Every server or the command runs in DMs. Sending a message or running any command in a server clears the guild entry first and then the global one; turning Command Use Clears off in `/afk preferences` stops commands from clearing it, while messages, voice joins and expiries always still do. - Reasons are sanitized automatically: `@everyone` and `@here` are neutralized and role and user mentions are stripped, so a status can never ping anyone. - A direct mention of the AFK member or a reply to one of their messages triggers the reply; pinging a role, @everyone or @here never does. Bots are skipped, self-replies do nothing, bypass roles are never treated as AFK, excluded channels stay silent, and each AFK user is answered at most once per Reply Cooldown. - The mention reply renders as an embed that ends with a Discord relative timestamp (`
`) for when the member went AFK, so every viewer sees the elapsed time in their own timezone, and it never actually notifies the AFK member again. - The digest DM lists every recorded ping with the member who sent it as a real user mention and the channel where it happened as a real channel mention, capped at the last 15 pings. - When the AFK member sends a message, the status is deleted, the nickname is restored, and a "Welcome back" embed with the bolded away duration is posted in that channel as a reply to their message. Running a command clears the status the same way: the welcome back is posted in the command's channel when the server's checks allow it (module on, welcome back on, channel not excluded), otherwise the member gets a DM so they always know the status ended. Because a command clear is not a reply to any message, that post names the member with a mention ("Welcome back @user!") so everyone can see who it is about; a customized welcome back format is used as it is saved. If pings were recorded and digests are on, the member also gets a digest DM. - With an expiry set, a 60 second sweep clears the status when it runs out, restores the nickname and DMs the member unless they turned Expiry DMs off. Clear On Voice Join clears the status when the member joins a voice channel, unless they set Voice Join Clears to Never in `/afk preferences` or the server is on their ignore list. Both the expiry DM and the digest DM carry a small footer note reminding the member that `/afk preferences` controls these notifications. - The `[AFK]` display name prefix applies while the toggle is on, when the bot has Manage Nicknames and outranks the member, and the original name is restored on every clear path. ## Notes - Statuses are cached in memory and persisted to the database, so they survive restarts. - Global statuses belong to the member: server admins can hide the reason in their server but can never end or edit someone else's status from the dashboard.