> For the complete documentation index, see [llms.txt](https://infinitybot.gitbook.io/infinitybot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitybot.gitbook.io/infinitybot-docs/community-engagement/message-streaks.md).

# Message Streaks

Message Streaks will count the amount of days a user has send a message in your server, and reward them with a special message or role!

## Setup

You can set up the system with the `/message-streak setup` command.&#x20;

| Command Option Name | Function                                                                                                                               |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| action              | In this option you can select an action that you want to run on the system. You can view a list with actions [here](#command-actions). |

### Command Actions

There are a few actions that you can take with the `/message-streak setup` command, check all of them below:

<details>

<summary>Toggle message streaks</summary>

This option will toggle the system. Simply run the command with the 'Toggle message streaks' option to enable or disable the system.&#x20;

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FEMHjeiQAbtxRQPzEIlHN%2Fimage.png?alt=media&amp;token=8c9044f8-1cb4-4171-b541-b73d952e6567" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Set up a streak channel</summary>

This option will allow you to select a streak channel. A streak channel is the channel where the bot will send the streak-up messages.&#x20;

After you run the command with this option you will get a menu:

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FQBKuLeZIj4m0qtIHloY3%2Fimage.png?alt=media&amp;token=24412f11-3be0-4223-bea3-f176e6c2c7bd" alt=""><figcaption></figcaption></figure>

Select a channel with the menu to set up a streak channel, press the red button to remove your streak channel.&#x20;

</details>

<details>

<summary>Set up custom streak message</summary>

This option will allow you to set up a custom message for when someone extends or loses their streak.&#x20;

After you run the command, you will get a panel with 2 buttons:

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FrcXlygCG5klFolhc1tqf%2Fimage.png?alt=media&amp;token=3a6010c9-8204-4eef-950f-ec119fff6565" alt="" width="527"><figcaption></figcaption></figure>

Press the green 'Understand & continue' button if you want to enter a new message.&#x20;

press the red 'Remove custom message' button if you wish to remove both messages.&#x20;

After you pressed the green button, you will get a form, there is a set of variables you can use in these messages, you can read more about these [here](#variables).&#x20;

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2F2ln7ohmJIBhWjFKydypq%2Fimage.png?alt=media&amp;token=02264d4e-c5ee-4406-99f7-84f500a1f9a9" alt="" width="400"><figcaption></figcaption></figure>

Simply enter your wanted message content here and press 'Submit'.

</details>

<details>

<summary>Set up streak roles</summary>

This option will allow you to set up streak roles. Streak roles will be given to a user once they reach a certain day streak.&#x20;

After you run the command with this option you will get a menu:

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2Ft81QwYe7ldzLBFNbU3Qq%2Fimage.png?alt=media&amp;token=1b84766d-9630-42ff-ab31-68c0bde9649b" alt=""><figcaption></figcaption></figure>

If you wish to add a role to a day, simply select it with the menu.&#x20;

You can also use the red button to remove a, or all roles from a day.&#x20;

{% hint style="danger" %}
Never select a role with dangerous permissions here (administrator, manage server/channels/roles, etc) as everyone will then be able to get these roles!
{% endhint %}

After you selected a role, you will get a form:

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FpGZYNOM6bloUad4aXsSP%2Fimage.png?alt=media&amp;token=5dcff81c-b40e-462f-849d-a1ace501a75d" alt="" width="392"><figcaption></figcaption></figure>

Simply enter a number at what day streak you want to give the selected role. For example: "5".

</details>

<details>

<summary>Select streak bot</summary>

This option allowes you to switch from bot for the streak messages. To be able to use InfinityBot Premium, you will need to have a [premium subscription](/infinitybot-docs/basics/premium.md).&#x20;

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FEnu4j9TowFLv1yP0iuIL%2Fimage.png?alt=media&amp;token=a86d0f52-f1bd-4a65-9c15-095a9794eeee" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Set streak daily requirement</summary>

This option allowed you to set the daily amount of messages a user needs to send before they get their day streak.&#x20;

After you used the command with this option, you will get a form:

<figure><img src="https://2255898787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqXmdaTQZknKkvcG0Uxz%2Fuploads%2FsX3lzKOYKl70cVGvZc2X%2Fimage.png?alt=media&amp;token=4d7d6eba-d2c4-4920-9206-6095c8ad3c67" alt="" width="398"><figcaption></figcaption></figure>

Simply enter the number of messages you want users to send before getting their streak.&#x20;

</details>

### Get a User's Day Streak

You can view your own day streak with the `/message-streak user` command. You can also view the day streak of other users by selecting a user in the optional 'user' option.&#x20;

### Variables

There is a set of variables that you can use in the custom message content. A list can be found below:

| Variable      | Function                                   | Example output   | Example of usage                                   |
| ------------- | ------------------------------------------ | ---------------- | -------------------------------------------------- |
| `[user]`      | Ping the user that got the streak.         | @user            | \[user] just got their daily message streak!       |
| `[user_name]` | Show the user name of that got the streak. | notcastel        | \[user\_name] just got their daily message streak! |
| `[streak]`    | Shows the day streak of a user             | 14               | You now have a  \[streak] day streak!              |
| `[server]`    | Shows the name of the server               | 🪐Cosmos Lounge✨ | You just got your message streak in \[server]!     |

{% hint style="info" %}
A user will lose their day streaks if they miss one day and can't freeze it anymore. A 'new day' starts at 23:59 CET. (GMT+1)
{% endhint %}
