XpEventCallback
This documentation defines callback functions that can be used to handle different XP events. These callbacks are invoked when specific events, such as debug, error, info, level-up, and warn, occur during the execution of an XP-related functionality.
Callbacks
debugβ
This callback is used when a debug event is emitted.
| Parameter | Type | Description |
|---|---|---|
| xpFunction | string | The function firing this event. |
| message | string | The message of the event. |
errorβ
This callback is used when an error event is emitted.
| Parameter | Type | Description |
|---|---|---|
| xpFunction | string | The function firing this event. |
| message | string | The message of the event. |
infoβ
This callback is used when an info event is emitted.
| Parameter | Type | Description |
|---|---|---|
| xpFunction | string | The function firing this event. |
| message | string | The message of the event. |
levelDownβ
This callback is used when a user loses a level.
| Parameter | Type | Description |
|---|---|---|
| data | UserResult | The user data. |
| lostRoles | string[] | The lost roles of user |
levelUpβ
This callback is used when a user levels up.
| Parameter | Type | Description |
|---|---|---|
| data | UserResult | The user data. |
| newRoles | string[] | The new roles of user |
warnβ
This callback is used when a warn event is emitted.
| Parameter | Type | Description |
|---|---|---|
| xpFunction | string | The function firing this event. |
| message | string | The message of the event. |