# Status roles

Source: https://righteousbot.dev/docs/features/status-roles/

Give a role to anyone who puts your invite in their custom status, and thank them for it.

A member puts your invite code in their Discord custom status, and the bot gives them a role for as long as
it stays there. When they change or clear it, the role comes off. This is **Server Premium**, every
subcommand needs **Manage Roles** and **Manage Server**, and you can set up to **four** codes per server.

## Set up the role [#set-up-the-role]

[`,statusroles add`](/commands/server-tools/statusroles/#statusroles-add) pairs an invite code (15
characters or fewer) with a role. The code is matched anywhere in the status, so `join gg/righteous, it's
great` matches `gg/righteous`.

<CommandBlock syntax=",statusroles add <invite code> <role>" example=",statusroles add gg/righteous Supporter" />

<Callout type="warn" title="Dangerous roles are refused">
  The role is handed out with no human in the loop, so one carrying Administrator, Ban Members, Kick
  Members or any Manage permission is refused, and so is one above the bot. Use a cosmetic role.
</Callout>

[`,statusroles list`](/commands/server-tools/statusroles/#statusroles-list) shows what you have set and
[`,statusroles remove`](/commands/server-tools/statusroles/#statusroles-remove) takes a pair off.

## Thank them for it [#thank-them-for-it]

Nothing is posted by default. Point the bot at a channel and it announces with a built-in message.

<CommandBlock syntax=",statusroles channel <channel>" example=",statusroles channel #general" />

You can also set the channel on the Premium page of the
[config panel](/docs/getting-started/introduction/#open-the-config-panel).

## Write your own message [#write-your-own-message]

<CommandBlock syntax=",statusroles announce set <message>" example=",statusroles announce set thanks for repping us, {user.mention}" />

The message takes the full [embed code syntax](/docs/features/embed-codes/). On slash, `set` opens a text
box prefilled with your current message.

| Command                                                                                   | Does                                            |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------- |
| [`,statusroles announce view`](/commands/server-tools/statusroles/#statusroles-announce)  | Shows the channel and the message in use        |
| [`,statusroles announce set`](/commands/server-tools/statusroles/#statusroles-announce)   | Replaces the message                            |
| [`,statusroles announce reset`](/commands/server-tools/statusroles/#statusroles-announce) | Back to the built-in message, keeps the channel |
| [`,statusroles announce off`](/commands/server-tools/statusroles/#statusroles-announce)   | Clears the channel, so nothing is posted        |

To stop the posts you want `off`, not `reset`.

## What gets announced [#what-gets-announced]

One post goes out when a member **earns** the role. Losing it is silent, two codes matched at once is still
one post, and a role the bot couldn't actually give (above the bot) is never announced.

## Common issues [#common-issues]

**The role is never given.** Only a custom status counts, not Spotify or a game, and the member can't be
offline. Check `,statusroles list`: the code is matched literally.

**The role is given but nothing is posted.** No channel is set. `,statusroles announce view` says so.

**Nothing works at all.** Status roles need Server Premium. See
[premium tiers](/docs/getting-started/premium-tiers/) and [common issues](/docs/common-issues/).
