# Events

This page contains documentation about the scripting events.&#x20;

Each event has the following method:&#x20;

### `getHandlerName(): String`

This method returns the Event Handler name.

{% hint style="info" %}
The method above is an internally-used method, should not be used in your scripts.
{% endhint %}

## Handling events

To handle an event, call the `handle(handlerName: String, handlerFunction: Function(Event)): Undefined` method on an object that you want your handler to run on. (example: your module, command, the entire script)

## Cancellable events

Some events can be cancelled, while other events can't be. Cancellable events have 2 methods that non-cancellable events don't.

### `isCancelled(): Boolean`

Returns if the event has been cancelled or not.

### `setCancelled(cancelled): Undefined`

Sets the cancelled state of the event.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://riseclients-organization.gitbook.io/rise-6-scripting-api/api-documentation/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
