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

# Syntax

> The formats confine expects when you pass it a duration, channel, or flag.

## Durations

A number followed by a unit, no spaces:

| Unit | Meaning |
| ---- | ------- |
| `s`  | Seconds |
| `m`  | Minutes |
| `h`  | Hours   |
| `d`  | Days    |
| `w`  | Weeks   |

Units can be chained — `2d3h` is two days and three hours.

<CodeGroup>
  ```javascript Correct theme={null}
  ,tempban @financely 7d spamming
  ,tempban @financely 1w2d spamming
  ```

  ```javascript Incorrect theme={null}
  ,tempban @financely 7 days spamming
  ,tempban @financely "1 week" spamming
  ```
</CodeGroup>

<Info>
  Some commands only accept units up to days. If a duration is rejected, drop the `w` and use days instead.
</Info>

## Positions and timestamps

A few commands take a position in a track rather than a length of time. These accept `m:ss` or a plain number of seconds.

```javascript theme={null}
,seek 1:30
,seek 90
```

## Targeting things

<Tabs>
  <Tab title="Channels">
    Mentions, IDs, and names all work:

    ```javascript theme={null}
    ,log add #logs messages
    ,log add 123456789012345678 messages
    ,log add logs messages
    ```

    Name matching is partial, so `,log add log messages` finds `#logs` too. When several channels match, confine takes the first.
  </Tab>

  <Tab title="Roles">
    Same three forms:

    ```javascript theme={null}
        ,fakepermissions add @Moderator ban_members
        ,fakepermissions add 123456789012345678 ban_members
        ,fakepermissions add Moderator ban_members
    ```

    Exact name matches win over partial ones.
  </Tab>

  <Tab title="Members">
    Mentions, IDs, usernames, and nicknames:

    ```javascript theme={null}
        ,ban @financely
        ,ban 123456789012345678
        ,ban financely
    ```
  </Tab>

  <Tab title="Messages">
    Message links work anywhere. A bare message ID only works if you're in the same channel as the message.

    ```javascript theme={null}
        ,buttonrole remove https://discord.com/channels/... 1
        ,buttonrole remove 123456789012345678 1
    ```

    To get a link, right-click the message (or long-press on mobile) and copy its link.
  </Tab>
</Tabs>

## Yes or no

Toggles accept any of these:

| On                                           | Off                                             |
| -------------------------------------------- | ----------------------------------------------- |
| `yes` · `on` · `true` · `enable` · `enabled` | `no` · `off` · `false` · `disable` · `disabled` |

```javascript theme={null}
,counting sameuser no
,starboard selfstar off
```

## Colors

Hex codes work with or without the `#`, and `0x` is accepted too:

```javascript theme={null}
,starboard color #5865F2
,starboard color 5865F2
```

Color names work as well, though the available names differ slightly between commands. `red`, `green`, `blue`, `yellow`, `orange`, `purple`, and `white` are safe everywhere.

<Tip>
  If a color name is rejected, use the hex code instead — those are accepted by every command that takes a color.
</Tip>

## Flags

Flags go after the main arguments and start with `$`:

```javascript theme={null}
,antiraid massjoin on $threshold 10 $punishment kick
,welcome add #general hey {user.mention} $delete 30
,reactionrole add (message) ✅ @Member $persistent
```

### Punishments

Commands with a `$punishment` flag accept:

| Punishment | Effect                             |
| ---------- | ---------------------------------- |
| `warn`     | Records a warning                  |
| `jail`     | Confines them to your jail channel |
| `kick`     | Removes them from the server       |
| `ban`      | Bans them                          |

<Info>
  `jail` needs your moderation system set up — run `,setup` first.
</Info>

## Removing by list position

Some commands let you target an entry by its number in the `list` output rather than by name. Run `list` first, then use `select:` with the number.

```javascript theme={null}
,counter list
,counter remove select:2
```

Useful when the thing you're removing no longer exists — a deleted channel, for instance — and there's no name left to type.

## Multiple values

Where a command takes several roles at once, separate them with commas:

```javascript theme={null}
,giveaways edit requiredroles (message link) @Member, @Booster
,fakepermissions add @Mod ban_members, kick_members
```

Spaces work as separators for permissions too.

## Emojis

Standard Unicode emojis and custom server emojis both work. Custom emojis have to be from a server confine is in.

```javascript theme={null}
,starboard emoji ⭐
,starboard emoji <:star:123456789012345678>
```

## Images

Image URLs must be hosted on Discord's CDN — links from elsewhere are rejected.

<Tip>
  Upload the image to any Discord channel, then right-click it and copy the link. That produces a URL confine accepts.
</Tip>

Many commands also accept an image attached directly to your command message.

## Multi-word arguments

Anything at the end of a command absorbs the rest of the message, so quotes aren't needed:

```javascript theme={null}
,ban @financely posting scam links in general
```

Arguments in the middle can't contain spaces unless the command specifically supports it — that's why role and channel names are usually easier to pass as mentions.
