# 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.
