# Actions

## How it works?

You can find an explanation [**here**](https://docs.characterweaver.com/overview/how-it-works#actions).

{% hint style="danger" %}
Be sure to have read [how to configure a character](https://docs.characterweaver.com/fundamentals/getting-set-up/configure-a-character) and [how to configure a behavior](https://docs.characterweaver.com/fundamentals/getting-set-up/configure-a-behavior) before starting here.
{% endhint %}

## List

This section lists all the types of actions that can be added to behaviors.

***

{% hint style="info" %}
Every actions support the [placeholders](https://docs.characterweaver.com/behavior/placeholders) which can be used anywhere there is text.
{% endhint %}

### SEND\_MESSAGE

This action allows you to send a message defined in a channel.

#### Settings

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Message</td><td>The message to send.</td><td>Text</td></tr><tr><td>Channel</td><td>The channel to send the message in.</td><td>Channel or "event channel"</td></tr></tbody></table>

***

### SEND\_EMBED\_MESSAGE

This action allows you to send a embed message defined in a channel.

#### Settings

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Title</td><td>The embed title.</td><td>Text</td></tr><tr><td>Description</td><td>The embed description.</td><td>Text</td></tr><tr><td>Footer</td><td>The embed footer.</td><td>Text</td></tr><tr><td>Image URL</td><td>The embed image.</td><td>Text (URL)</td></tr><tr><td>Color</td><td>The embed color.</td><td>Number (RGB)</td></tr><tr><td>Channel</td><td>The channel to send the message in.</td><td>Channel or "event channel"</td></tr></tbody></table>

***

### AI\_SEND\_MESSAGE

This action sends an AI-generated message into a channel.

<mark style="color:yellow;">⚠️</mark> This action consumes [ai-credits](https://docs.characterweaver.com/overview/faq#how-work-ai-credits). You can use [SEND\_MESSAGE](#send_message) if you want no consumption but you will not be able to generate messages by AI.

#### Settings

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Pre-prompt</td><td>Context/Personality of the response.</td><td>Text</td></tr><tr><td>Prompt</td><td>User input.</td><td>Text</td></tr><tr><td>Message</td><td>The message to send.</td><td>Text</td></tr><tr><td>Temperature</td><td>AI temperature. Higher, more random and whimsical.</td><td>Selecting from a defined list</td></tr><tr><td>Channel</td><td>The channel to send the message in.</td><td>Channel or "event channel"</td></tr></tbody></table>

{% hint style="info" %}
In most cases, the **Prompt** setting is set to **{event\_message}** to match the message sent. Same thing for the **Message** setting which is set to **{result}** to send the generated message.
{% endhint %}

Here are some examples:

{% tabs %}
{% tab title="Pre-prompt" %}

* You're Harry Potter so answer like him.
* You're {character} so answer like him.
* You are {character} and your answers are very funny.
  {% endtab %}

{% tab title="Prompt" %}

* {event\_message}
* The message is: {event\_message}
  {% endtab %}

{% tab title="Message" %}

* {result}
* Here is my answer: {result}
  {% endtab %}
  {% endtabs %}

***

### AI\_SEND\_EMBED\_MESSAGE

This action sends an AI-generated embed message into a channel.

<mark style="color:yellow;">⚠️</mark> This action consumes [ai-credits](https://docs.characterweaver.com/overview/faq#how-work-ai-credits). You can use [SEND\_EMBED\_MESSAGE](#send_embed_message) if you want no consumption but you will not be able to generate messages by AI.

#### Settings

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Pre-prompt</td><td>Context/Personality of the response.</td><td>Text</td></tr><tr><td>Prompt</td><td>User input.</td><td>Text</td></tr><tr><td>Temperature</td><td>AI temperature. Higher, more random and whimsical.</td><td>Selecting from a defined list</td></tr><tr><td>Channel</td><td>The channel to send the message in.</td><td>Channel or "event channel"</td></tr><tr><td>Title</td><td>The embed title.</td><td>Text</td></tr><tr><td>Description</td><td>The embed description.</td><td>Text</td></tr><tr><td>Footer</td><td>The embed footer.</td><td>Text</td></tr><tr><td>Image URL</td><td>The embed image.</td><td>Text (URL)</td></tr><tr><td>Color</td><td>The embed color.</td><td>Number (RGB)</td></tr></tbody></table>

{% hint style="info" %}
In most cases, the **Prompt** setting is set to **{event\_message}** to match the message sent. Same thing for the **Message** setting which is set to **{result}** to send the generated message.
{% endhint %}

Here are some examples:

{% tabs %}
{% tab title="Pre-prompt" %}

* You're Harry Potter so answer like him.
* You're {character} so answer like him.
* You are {character} and your answers are very funny.
  {% endtab %}

{% tab title="Prompt" %}

* {event\_message}
* The message is: {event\_message}
  {% endtab %}

{% tab title="Message" %}

* {result}
* Here is my answer: {result}
  {% endtab %}
  {% endtabs %}

***

### AI\_RENAME\_MEMBER

This action edit the username of a member of your server; AI-generated.

<mark style="color:yellow;">⚠️</mark> This action consumes [ai-credits](https://docs.characterweaver.com/overview/faq#how-work-ai-credits). You can use [RENAME\_MEMBER](#rename_member) if you want no consumption but you will not be able to generate name by AI.

#### Settings

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Pre-prompt</td><td>Context/Personality of the response.</td><td>Text</td></tr><tr><td>Prompt</td><td>User input.</td><td>Text</td></tr><tr><td>New name</td><td>The new nember name.</td><td>Text</td></tr><tr><td>Temperature</td><td>AI temperature. Higher, more random and whimsical.</td><td>Selecting from a defined list</td></tr></tbody></table>

Here are some examples:

{% tabs %}
{% tab title="Pre-prompt" %}

* Your answer is a funny name from an existing name. The user input is the existing name.
  {% endtab %}

{% tab title="Prompt" %}

* {event\_member\_nickname}
  {% endtab %}
  {% endtabs %}

***

### RENAME\_MEMBER

This action allows you to rename the member associated with the triggered event.

#### Settings

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>New name</td><td>The new member name.</td><td>Text</td></tr></tbody></table>

***

### ADD\_ROLE

This action is used to give a role to the member associated with the triggered event.

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Role</td><td>The role to add.</td><td>Selecting from a defined list</td></tr></tbody></table>

***

### REMOVE\_ROLE

This action is used to remove a role to the member associated with the triggered event.

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Role</td><td>The role to remove.</td><td>Selecting from a defined list</td></tr></tbody></table>

***

### DELETE\_MESSAGE

This action is used to delete a message with a specific delay.

<table><thead><tr><th width="174">Name of setting</th><th width="314.3333333333333">Description</th><th>Type of input</th></tr></thead><tbody><tr><td>Delay</td><td>Delay in seconds.</td><td>Number</td></tr></tbody></table>

***

> 💡 An "event channel" is an additional type of option which allows action in the channel where the event was triggered. This option can obviously only be used in contexts where a channel is concerned.

{% hint style="info" %}
To understand how placeholders work, refer to [**this**](https://docs.characterweaver.com/placeholders#how-it-works) page.
{% endhint %}
