# Configure a Behavior

> By default, a character has no behavior and **never** interacts on your server.

> CharacterWeaver allows you to create behaviors that are triggered automatically when certain events are called. For example, a message sent by a user or a new member who joins your server.

## Creating behavior

> To create a new behavior, you must use the command:\
> `/behavior create <behavior-name> <event-type>`

> **behavior-name** is never visible and only serves as an identifier. The identifier will be used when you change it, so choose something short like "auto-response".

> **event-type** is the event type that triggers the behavior when called. You can find the list of available events [**here**](https://docs.characterweaver.com/behavior/event-types).

## Adding an action to a behavior

> To create a new action in a behavior, you must use the command:\
> `/behavior action create <behavior-name> <action-name> <action-type>`

> **behavior-name** is the name of the behavior specified when it was created.

> **action-name** is never visible and only serves as an identifier. The identifier will be used when you change it, so choose something short like "send-response".

> **action-type** is the type of action that will be triggered, you can find the list [**here**](https://docs.characterweaver.com/behavior/actions#list).

{% hint style="info" %}
To find out how to configure each setting, visit the associated event documentation.\
You can find the list [**here**](https://docs.characterweaver.com/behavior/actions#list).
{% endhint %}

## Editing an action

> To edit an action in a behavior, you can click on the "Configure Action" button\
> or simply use the command:\
> `/behavior action edit <behavior-name> <action-name>`

> **behavior-name** is the name of the behavior specified when it was created.

> **action-name** is the name of the action specified when it was created.

<figure><img src="https://128385580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7u0XtF5hFItrgk1ACa8R%2Fuploads%2FmIOlklBEUYnwKLnSG7tT%2Fbehavior-create.gif?alt=media&#x26;token=86463138-fe5f-478e-a8cf-74b887fb2f1b" alt=""><figcaption></figcaption></figure>

## Add behavior to a character and test it

> To add a behavior to a character, you must use the command:\
> `/character behavior add <character> <behavior-name>`

<figure><img src="https://128385580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7u0XtF5hFItrgk1ACa8R%2Fuploads%2Fn0Bg6Vc18apW3zTG9dlj%2Fadd-test.gif?alt=media&#x26;token=97fd522a-30c9-4017-9d49-3391971a8a3c" alt=""><figcaption></figcaption></figure>

## Adding a filter to a behavior

To create a new filter in a behavior, you must use the command:\
`/behavior filter create <behavior-name> <filter-name> <filter-type>`

> **behavior-name** is the name of the behavior specified when it was created.

> **filter-name** is never visible and only serves as an identifier. The identifier will be used when you change it, so choose something short like "contained".

> **filter-type** is the type of filter that will be triggered, you can find the list [**here**](https://docs.characterweaver.com/behavior/filters#list).

## Editing a filter

> To edit a new filter in a behavior, you can click on the "Configure Filter" button\
> or simply use the command:\
> `/behavior filter edit <behavior-name> <filter-name>`

> **behavior-name** is the name of the behavior specified when it was created.

> **filter-name** is the name of the action specified when it was created.

<figure><img src="https://128385580-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7u0XtF5hFItrgk1ACa8R%2Fuploads%2FMbQAM0nGbUYMVBCoNVvS%2Ffilter-test.gif?alt=media&#x26;token=ffd96f63-db0d-4f96-84c1-b3d4889f507e" alt=""><figcaption></figcaption></figure>

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