You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

IBaseBroker

export declare interface IBaseBroker<TEvents extends Record<string, any>>
export declare interface IBaseBroker<TEvents extends Record<string, any>>

No summary provided.

NameConstraintsOptionalDefaultDescription
TEventsRecord<string, any>NoNone
subscribe(group, events):Promise<void>
Subscribes to the given events, grouping them by the given group name
NameTypeOptionalDescription
groupstringNoNone
events(keyof TEvents)[]NoNone
unsubscribe(group, events):Promise<void>
Unsubscribes from the given events - it's required to pass the same group name as when subscribing for proper cleanup
NameTypeOptionalDescription
groupstringNoNone
events(keyof TEvents)[]NoNone