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

# Join gate

> Screen new members on arrival: account age, avatar, and username checks, with a captcha for anyone who fails.

The join gate checks every new member as they arrive and stops the ones that look like throwaway or raid accounts. Members who pass are never interrupted.

<Info>
  Every `joingate` command needs **Administrator**, and Bloom needs **Kick Members**, **Ban Members**, and **Moderate Members**.
</Info>

## How a join is checked

<Steps>
  <Step title="Bloom runs your checks">
    Account age, missing avatar, default avatar, and username, in that order. Bots skip the gate entirely, and so does anyone on the whitelist.
  </Step>

  <Step title="Passing members are let in">
    If nothing fails, the member joins normally with no captcha and no message.
  </Step>

  <Step title="Failing members are stopped">
    With captcha off, the member is kicked or banned and told why. With captcha on, they are timed out and sent a code in a direct message instead, so a real person can still get in.
  </Step>

  <Step title="The clock runs out">
    A member who never solves the captcha is kicked or banned when their time expires.
  </Step>
</Steps>

<Warning>
  Turning on the captcha alone does nothing. It only triggers for members who fail one of the checks, so you must enable at least one check for the gate to do any work.
</Warning>

## Defaults

| Setting                   | Default  |
| ------------------------- | -------- |
| Join gate                 | Off      |
| Every check               | Off      |
| Punishment                | Kick     |
| Time to solve the captcha | 1 hour   |
| Members with DMs closed   | Punished |

## Quick start

<Steps>
  <Step title="Pick your checks">
    `!joingate newaccount 7d` turns away accounts made in the last week. It is the single most effective check against throwaway accounts.
  </Step>

  <Step title="Add the captcha">
    `!joingate captcha on` gives anyone who trips a check the chance to prove they are human instead of being removed outright.
  </Step>

  <Step title="Turn the gate on">
    `!joingate enable`. Bloom replies `Joingate has been enabled.` Nothing is checked until you do this.
  </Step>

  <Step title="Review it">
    `!joingate` shows every setting and how many members are whitelisted.
  </Step>
</Steps>

## The checks

<ParamField path="joingate newaccount <duration|off>" type="Administrator">
  Rejects accounts younger than the age you set. Also `accountage`, `age`.

  * Takes a [duration](/reference/time) such as `7d`, `24h`, or `1w`.
  * `!joingate newaccount 7d` replies `Minimum account age set to 7 days.`
  * `off` removes the requirement.
</ParamField>

<ParamField path="joingate noavatar <on|off>" type="Administrator">
  Rejects accounts with no profile picture at all.
</ParamField>

<ParamField path="joingate defaultavatar <on|off>" type="Administrator">
  Rejects accounts still using one of Discord's default avatars. Also `default`. This covers everything `noavatar` does.
</ParamField>

<ParamField path="joingate username <on|off>" type="Administrator">
  Rejects accounts whose username or display name looks like advertising, such as an invite link, a web address, a free-Nitro pitch, or heavy character stacking. Also `name`.
</ParamField>

## Settings

<ParamField path="joingate punishment <kick|ban>" type="Administrator">
  What happens to a member who fails, or who never solves the captcha. Also `punish`, `action`. The default is `kick`, which lets someone return once they fix the problem.
</ParamField>

<ParamField path="joingate duration <duration>" type="Administrator">
  How long a member has to solve the captcha. They are timed out for this whole period, so they cannot talk until they verify. Also `time`, `wait`.

  * **Minimum** 5 minutes, **maximum** 7 days. The default is 1 hour.
</ParamField>

<ParamField path="joingate dmfail <punish|skip>" type="Administrator">
  What to do when Bloom cannot send the captcha because the member has direct messages closed.

  * `punish` removes them, the default.
  * `skip` lets them in without verifying.
</ParamField>

<Tip>
  Many people keep direct messages from strangers turned off, so `punish` will turn away real members. If your server is not under active attack, `skip` is the friendlier setting.
</Tip>

## Letting people through

<ParamField path="joingate whitelist <add|remove|list> [user]" type="Administrator">
  Members on the whitelist skip every check. Also `wl`. Takes a mention or a user ID.

  * `!joingate whitelist add @Someone` replies that they were added.
  * `!joingate whitelist list` shows everyone exempt.
</ParamField>

<ParamField path="joingate verify <user>" type="Administrator">
  Verifies a member yourself. Bloom clears their pending captcha and lifts the timeout, so they can chat right away. Use it when someone cannot receive the code.
</ParamField>

<ParamField path="joingate [settings]" type="Administrator">
  Run `!joingate` on its own, or `!joingate settings`, to see the gate's status, each check, the punishment, the captcha time, and the whitelist count. Also `config`, `status`.
</ParamField>

<ParamField path="joingate reset" type="Administrator">
  Puts every join gate setting back to its default, which also turns the gate off.
</ParamField>

## What the member sees

A member who fails a check with the captcha enabled gets a direct message naming the reason, an image with a code, and how long they have. They reply with the code to be let in, and Bloom answers `Verified! Welcome to <server>.` and lifts their timeout.

* The code ignores capitals.
* A wrong answer can be tried again as often as they like within the time limit.
* Replying `new` or `refresh` sends a fresh code.

With the captcha disabled, they are told why they cannot join and are removed immediately.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Nobody is being checked">
    Run `!joingate`. The status must be **Enabled** and at least one check must be **On**. A gate that is enabled with every check off lets everyone through.
  </Accordion>

  <Accordion title="Real members are being kicked">
    The usual cause is `dmfail punish` combined with the captcha, which removes anyone who cannot receive a direct message. Switch to `!joingate dmfail skip`, or lower your account age requirement.
  </Accordion>

  <Accordion title="A member says they never got the code">
    They have direct messages from server members turned off. Have them enable it in **Privacy Settings** for your server and rejoin, or run `!joingate verify @them` to let them in by hand.
  </Accordion>

  <Accordion title="Members stay timed out after verifying">
    Bloom lifts the timeout itself when the code is accepted. If it could not, it tells the member to contact a moderator, which normally means Bloom's role is below theirs. Move Bloom's role up and clear the timeout with `!untimeout`.
  </Accordion>

  <Accordion title="A bot got through the gate">
    Bots are not checked by the join gate. Bot additions are handled by anti-nuke instead.
  </Accordion>
</AccordionGroup>

## Related pages

<CardGroup cols={2}>
  <Card title="Welcome messages" icon="door-open" href="/configuration/welcome">
    The public greeting, which only fires once a member is past the gate.
  </Card>

  <Card title="Bans, kicks, and timeouts" icon="gavel" href="/moderation/punishments">
    The actions the gate applies, and how to reverse one.
  </Card>

  <Card title="Durations and time zones" icon="clock" href="/reference/time">
    The format for the account age and captcha time.
  </Card>

  <Card title="Event logging" icon="scroll" href="/configuration/logging">
    Record joins and leaves in a staff channel.
  </Card>
</CardGroup>
