# Clock-in

Set the Discord clock-in channel, delete stray dots and track who clocks in every day, with a ranking and streaks.

Source: https://fivedash.fivex.gg/docs/en/discord/clock-in

**Clock-in** organizes the city staff's attendance on Discord. A clock-in message is just a period (`.`), and it only counts in the clock-in channel. In any other channel, the bot deletes it right away. The dashboard counts every dot and shows who clocks in the most, so management can follow the staff's attendance. This page is for the owner and the staff who run the server's Discord.

## Before you start

* **Plan:** the Discord module must be in the organization's plan (Plus, Pro and Ultra all include it).
* **Bot connected:** the city's bot must be connected to the Discord server. See [Bot](https://fivedash.fivex.gg/docs/en/discord/bot).
* **Message Content Intent:** turn it on under **Bot → Privileged Gateway Intents**, in Discord's Developer Portal. Without it, Discord doesn't show message text and the bot can't tell what a dot is. The page warns you when it's off.
* **Discord permission:** to delete messages, the bot needs **Manage Messages** in the channels.
* **Access level** on the **Clock-in** area:

| Level         | What it allows                                              |
| ------------- | ----------------------------------------------------------- |
| **View**      | Who clocks in and what was deleted (**Overview** tab)       |
| **Configure** | Channel, rules, who's exempt and notices (**Settings** tab) |

People with only **View** see the notice: "Your access only lets you view the clock-in settings."

## What counts as a dot

A dot is a message with only periods (`.`, `..`, `•` and similar) and spaces, with nothing attached. Edits don't count, and messages from bots and webhooks are ignored.

| Where                        | What the bot does                                         |
| ---------------------------- | --------------------------------------------------------- |
| Dot in the clock-in channel  | Counts as a clock-in, for everyone.                       |
| Text in the clock-in channel | Deletes it, if **Dots only in the channel** is on.        |
| Dot in another channel       | Deletes it, if **Delete dots outside the channel** is on. |
| Text in another channel      | Nothing.                                                  |

Anyone under **Who's exempt** can send dots in any channel and write in the clock-in channel without having the message deleted.

## Turn clock-in on

### Open the page

In the dashboard, go to **Discord → Clock-in** and open the **Settings** tab.

### Pick the clock-in channel

Under **Clock-in channel → Channel**, pick the only channel where clock-in messages can be sent.

### Pick the rules

Leave **Dots only in the channel** and **Delete dots outside the channel** on or off, as you prefer.

### Set who's exempt

Under **Who's exempt**, pick the **Exempt roles**, add **People** and decide whether **Admins are exempt**.

### Pick the notice

Under **Notice**, pick **How to notify** and adjust the texts.

### Turn it on and save

Turn on **Turn clock-in on** (it shows **On**) and click **Save**.

> Clock-in depends on the bot receiving live events. If the page shows "The bot isn't receiving live events right now", no dots are counted or deleted until it's back.

## Settings

### Clock-in channel

| Field                              | What it does                                                                      | Default |
| ---------------------------------- | --------------------------------------------------------------------------------- | ------- |
| **Channel** (**Clock-in channel**) | The only channel where clock-in messages (.) can be sent. Required to turn it on. | None    |
| **Dots only in the channel**       | Anything else sent in the clock-in channel is deleted, to keep it clean.          | On      |

### In other channels

| Field                               | What it does                                                              | Default |
| ----------------------------------- | ------------------------------------------------------------------------- | ------- |
| **Delete dots outside the channel** | A message that's just a dot, in any other channel, disappears right away. | On      |

### Who's exempt

| Field                        | What it does                                                                                   | Limit     | Default      |
| ---------------------------- | ---------------------------------------------------------------------------------------------- | --------- | ------------ |
| **Roles** (**Exempt roles**) | Anyone with one of these roles can send dots in any channel and write in the clock-in channel. | 25 roles  | **No roles** |
| **People**                   | Members who are exempt, even without one of these roles.                                       | 25 people | None         |
| **Admins are exempt**        | Anyone with the Administrator permission and the server owner.                                 | —         | On           |

> The Discord server's owner never has messages deleted, even with **Admins are exempt** off.

### Notice

**When the bot deletes a message**: how the member finds out. At most one notice per person every 30 seconds, so someone sending many dots in a row doesn't get many notices.

| Field                            | What it does                                                                                                                  | Options                                                                                                                                                      | Default                                                                                |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| **How to notify**                | Where the notice shows up.                                                                                                    | **In the channel** (a quick message that disappears on its own), **By DM** (only the member sees it, privately), **No notice** (the message just disappears) | **In the channel**                                                                     |
| **Dot in another channel**       | The notice for people who send dots outside the channel. Required while the notice and the rule are on. Up to 300 characters. | —                                                                                                                                                            | "`{{error}}` `{membro}`, clock-ins only go in `{canal}`." (English city)               |
| **Text in the clock-in channel** | The notice for people who write in the clock-in channel. Required while the notice and the rule are on. Up to 300 characters. | —                                                                                                                                                            | "`{{error}}` `{membro}`, `{canal}` is for clock-ins only: send a **.**" (English city) |
| **Delete the notice after**      | **In the channel** only. The channel notice disappears on its own, so it doesn't clutter the chat.                            | 5, 10, 15 or 30 seconds                                                                                                                                      | 10 seconds                                                                             |

`{{error}}` is the error icon from the bot's emoji pack.

### Variables

The names stay in Portuguese in every language.

| Variable   | Becomes              |
| ---------- | -------------------- |
| `{membro}` | Mentions who sent it |
| `{canal}`  | The clock-in channel |

## Preview

The preview next to the form shows Discord in two channels. Under **Preview channel**, switch between **Clock-in channel** and **Other channels** to see what stays, what the bot deletes and how the notice looks.

## Overview

The **Overview** tab shows the clock-in numbers:

| Number               | What it shows                                                   |
| -------------------- | --------------------------------------------------------------- |
| **Dots today**       | Today's dots and from how many people.                          |
| **Dots · 7 days**    | Dots in the last 7 days, against the week before.               |
| **People this week** | How many people clocked in during the last 7 days.              |
| **Deleted · 7 days** | Stray dots and text in the channel, deleted in the last 7 days. |
| **Dots per day**     | A chart of the last 14 days, with what was deleted.             |
| **Clocked in today** | Who clocked in today, newest first.                             |

**Who clocks in the most** is a ranking with **Member**, **This week**, **30 days**, **Streak** (days in a row with a dot, ending today or yesterday) and **Last dot**. Use **Show more** to load more rows.

**Activity** lists every dot and every message the bot deleted: **Clocked in**, **Dot outside the channel, deleted** and **Text in the clock-in channel, deleted**. Filter by **All**, **Dots** or **Deleted**.

> Days follow Brasília time.

## FAQ

**The bot doesn't delete anything or count dots.**
Check that the **Message Content Intent** is on in the Developer Portal, that **Turn clock-in on** is **On** and that the page doesn't show the live events notice. Also check that the bot has **Manage Messages** in the channel.

**The staff needs to talk in the clock-in channel.**
Add the staff role to **Exempt roles**, or turn off **Dots only in the channel**.

**Do edited messages count?**
No. Only the sent message counts. An edit doesn't become a dot and isn't deleted.

## Next steps

[Moderation](https://fivedash.fivex.gg/docs/en/discord/moderation)

Punishment commands and case log.

[Alignment](https://fivedash.fivex.gg/docs/en/discord/alignment)

Call members in to talk with the staff.

[Bot](https://fivedash.fivex.gg/docs/en/discord/bot)

The bot's intents, permissions and emoji pack.

[Team and permissions](https://fivedash.fivex.gg/docs/en/dashboard/team-and-permissions)

Choose who can view and who can configure clock-in.
