Special events
This section outlines the utilities for managing special events using a custom event emitter in Discord. It allows you to create and manage events efficiently without relying on the default client eve
messageEmitter
messageEmitter
An instance of EventEmitter
specifically designed to handle message events.
onceMessage
Function
onceMessage
FunctionThe onceMessage
function allows you to register a callback for a specific event that will only be executed once. After it is triggered, it will be removed automatically.
Parameters:
emitter
: The specific event emitter (fromEventEmitters
).cb
: The callback function to execute when the event is emitted.
Example:
More default Client events
The MoreClientEvents
interface extends the default Discord client events by adding custom events, such as raw
and afterReady
.
Example:
Last updated