InteractionListener

class

InteractionListener

source
export class InteractionListener<T extends InteractionListenerType> implements InteractionListenerData<T>
export class InteractionListener<T extends InteractionListenerType> implements InteractionListenerData<T>
constructor(data: InteractionListener.Resolvable<T>)
constructor(data: InteractionListener.Resolvable<T>)
ParamTypeRequired
data
data
InteractionListener.Resolvable<T>
InteractionListener.Resolvable<T>
Yes
public source

.filter(...)

filter(interaction: InteractionFromListenerType<T>): boolean
filter(interaction: InteractionFromListenerType<T>): boolean
ParamTypeRequired
interaction
interaction
InteractionFromListenerType<T>
InteractionFromListenerType<T>
Yes

Returns:

boolean
boolean

public source

.execute(...)

execute(interaction: InteractionFromListenerType<T>): Promise<void>
execute(interaction: InteractionFromListenerType<T>): Promise<void>
ParamTypeRequired
interaction
interaction
InteractionFromListenerType<T>
InteractionFromListenerType<T>
Yes

Returns:

Promise<void>
Promise<void>

public source

.toJSON()

toJSON(): InteractionListenerData<T>
toJSON(): InteractionListenerData<T>

Returns:

InteractionListenerData<T>
InteractionListenerData<T>

public static source

.from(...)

from<T extends InteractionListenerType>(data: InteractionListener.Resolvable<T>): InteractionListener<T>
from<T extends InteractionListenerType>(data: InteractionListener.Resolvable<T>): InteractionListener<T>
ParamTypeRequired
data
data
InteractionListener.Resolvable<T>
InteractionListener.Resolvable<T>
Yes

Returns:

InteractionListener<T>
InteractionListener<T>

public source

.id

string
string
string
string
public source

.type

T
T
public source

.once?

boolean
boolean