Skip to content
Danny SMc edited this page Dec 29, 2021 · 2 revisions

The queue is provided and included in every context instance and can be accessed by context.queue this queue is built for storing promises, with unique ID's for users, and allows you to catch incoming events directly from the bot's interactionCreate handler without having to write that code, we suggest using collectors in most instances, but of course if you want something different, this is an alternative option.

Methods

queue.get(uniqueId: string, userId: string): IQueueItemExtended | null

Will take a unique ID, and a user ID, and return the value in the queue for that user.

queue.set(uniqueId: string, item: IQueueItem): void

Will take a unique ID, and an item, and set the value in the queue for that user.