# Events

## Client Events

<details>

<summary>AddMessage</summary>

```lua
TriggerEvent('chat:addMessage', message)
```

* message: `table`&#x20;
  * args: `table` or `string`&#x20;
  * title?: `string`
  * barColor?: `string` or `[number, number, number]`&#x20;
  * type?: `string` (*error, warning, info, success, debug)*
  * timestap?: `string`&#x20;
  * icon?: `string`&#x20;

Example:

```lua
TriggerEvent('chat:addMessage', {
    args = {'Test message'},
    barColor = '#00FF00',
    type = 'info',
    title = 'INFO',
    timestamp = "13:00",
    icon = 'lucide:info'
})
```

</details>

<details>

<summary>AddSuggestion</summary>

```lua
TriggerEvent('chat:addSuggestion', name, help, params)
```

* name: `string`
* help: `string`
* params: `table`&#x20;

  * name: `string`
  * help: `string`
  * disasbled: `boolean`

Example:

```lua
TriggerEvent('chat:addSuggestion', 'test_command', 'Test description', {
    {
        name = 'player',
        help = 'The player to greet',
        disabled = false
    },
    {
        name = 'message',
        help = 'The message to send',
        disabled = false
    }
}, false)
```

</details>

<details>

<summary>RemoveSuggestion</summary>

```lua
TriggerEvent('chat:removeSuggestion', name)
```

* name: `string`

Example:

```lua
TriggerEvent('chat:removeSuggestion', 'test_command')
```

</details>

<details>

<summary>ClearChat</summary>

```lua
TriggerEvent('chat:clear')
```

</details>
