# Placeholders

## How it works?

When you have **text inputs** in actions or filters, you might want parts of text to be **automatically filled** with dynamic values. This is exactly what the placeholder system allows.

### Typical example

You have created a behavior that sends a message that says `"Hello everyone!"` and you want to add in this message the number of members present on your server to have a result like this:\
`"Hello everyone! Today we have 158 members on our server!"`\
Well this is **possible** with the placeholder system!\
You just need to write this as a message in the configuration:\
`"Hello everyone! Today we have {guild_member_count} members on our server!"`

{% hint style="warning" %}
Obviously, you should not write the quotation marks **`"`**
{% endhint %}

### Format

All placeholders have the format `{placeholder}`.

## List

Here is the list of all available placeholders.

Some placeholders can only work in certain contexts. For example, it is impossible to use the placeholder **{event\_channel}** in the [**MEMBER\_JOIN**](https://docs.characterweaver.com/event-types#member_join) event because no channel is affected by the arrival of a new member.&#x20;

### Placeholders that do not depend on context

<details>

<summary>{character}</summary>

The name of the character concerned.

A common usage is to do an [AI\_SEND\_MESSAGE](https://docs.characterweaver.com/actions#ai_send_message) action and pre-prompt something like: "You are {character} so answer like him."

Return example: Bobby

</details>

<details>

<summary>{guild_name}</summary>

The name of the server the bot is on.\
For example, this can be useful if you make a welcome message and often change the name of your server.

Return example: My super server

</details>

<details>

<summary>{guild_member_count}</summary>

Gives the total number of members present on your server.

Return example: 158

</details>

<details>

<summary>{guild_boost_count}</summary>

Gives the total number of current boosts on your server.

Return example: 0

</details>

<details>

<summary>{guild_boost_tier}</summary>

Gives the boost-tier of your server.

Return example:

* 0
* 1

</details>

<details>

<summary>{guild_icon}</summary>

Gives the link to your server icon.

</details>

<details>

<summary>{guild_banner}</summary>

Gives the link to your server banner.

</details>

<details>

<summary>{guild_channel_count}</summary>

Gives the total number of current channels on your server.

Return example: 12

</details>

<details>

<summary>{guild_role_count}</summary>

Gives the total number of current roles on your server.

Return example: 5

</details>

<details>

<summary>{guild_owner}</summary>

Gives the name of the server owner.

Return example: <@239418288617160715>

</details>

### Placeholders that depend on the context:

<details>

<summary>{event_message}</summary>

Gives the message context, usually when you use the [MESSAGE](https://docs.characterweaver.com/event-types#message) event.\
The return only keeps the formatting but not the mentions.

Return example: Hello **everyone**! Whizyyy

</details>

<details>

<summary>{event_message_raw}</summary>

Gives the message context, usually when you use the [MESSAGE](https://docs.characterweaver.com/event-types#message) event.\
The return **fully** retains the mentions and format of the initial message.

Return example: Hello **everyone**! [Whizyyy](https://app.gitbook.com/u/deKyI0XqG6PB9UCF6FDaGVVBiD73 "mention")

</details>

<details>

<summary>{event_message_stripped}</summary>

Gives the message context, usually when you use the [MESSAGE](https://docs.characterweaver.com/event-types#message) event.\
The return only keeps the text. For example, it removes mentions and the \*\* for bold.

Return example: Hello everyone! Whizyyy

</details>

<details>

<summary>{event_channel}</summary>

Give the mention of the channel concerned.

Return example: <@1144749550494564442>

</details>

<details>

<summary>{event_channel_name}</summary>

Give the name of the channel concerned.

Return example: general

</details>

<details>

<summary>{event_user}</summary>

Give the mention of the user concerned.

Return example: <@239418288617160715>

</details>

<details>

<summary>{event_user_effective_name}</summary>

Give the global name of the user concerned.

Return example: Darkkraft

</details>

<details>

<summary>{event_user_avatar}</summary>

Give the avatar of the user concerned.

</details>

<details>

<summary>{event_user_default_avatar}</summary>

Give the default avatar of the user concerned.

</details>

<details>

<summary>{event_member}</summary>

Give the mention of the member concerned.

Return example: <@239418288617160715>

</details>

<details>

<summary>{event_member_nickname}</summary>

Give the nickname of the member concerned.

Return example: The administrator

</details>

<details>

<summary>{event_member_effective_name}</summary>

Give the global name of the member concerned.

Return example: Darkkraft

</details>

<details>

<summary>{event_member_avatar}</summary>

Give the avatar of the member concerned.

</details>

<details>

<summary>{event_member_default_avatar}</summary>

Give the default avatar of the member concerned.

</details>

## Parsing

If you want to test the return of placeholders, it's possible!

You can use the `/placeholder parse` command.

<mark style="color:yellow;">⚠️</mark> Be careful, the **{character}** will not work because no character is associated.
