Skip to main content

Class: PaginatedMessage

discord.js-utilities/src.PaginatedMessage

Hierarchy

Constructors

constructor

new PaginatedMessage(«destructured»?)

Parameters

NameTypeDescription
«destructured»PaginatedMessageOptions

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:230

Properties

#thisMazeWasNotMeantForYouContent

Private #thisMazeWasNotMeantForYouContent: Object

Type declaration

NameType
contentstring

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:224


actions

actions: Map<string, PaginatedMessageAction>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:148


collector

collector: null | InteractionCollector<StringSelectMenuInteraction<CacheType> | ButtonInteraction<CacheType>> = null

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:138


constructor

constructor: typeof PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1538


embedFooterSeparator

embedFooterSeparator: string = PaginatedMessage.embedFooterSeparator

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:180


emitPartialDMChannelWarning

emitPartialDMChannelWarning: boolean = PaginatedMessage.emitPartialDMChannelWarning

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:194


hasEmittedMaxPageWarning

Protected hasEmittedMaxPageWarning: boolean = false

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:210


hasEmittedPartialDMChannelWarning

Protected hasEmittedPartialDMChannelWarning: boolean = false

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:219


idle

idle: number

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:160


index

index: number = 0

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:153


messages

messages: (null | PaginatedMessagePage)[] = []

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:143


pageIndexPrefix

pageIndexPrefix: string = PaginatedMessage.pageIndexPrefix

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:173


pages

pages: PaginatedMessagePage[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:128


paginatedMessageData

Protected paginatedMessageData: null | Omit<PaginatedMessageMessageOptionsUnion, "components"> = null

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:198


response

response: null | Message<boolean> | APIMessage | AnyInteractableInteraction = null

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:133


selectMenuOptions

Protected selectMenuOptions: PaginatedMessageSelectMenuOptionsFunction = PaginatedMessage.selectMenuOptions

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:200


selectMenuPlaceholder

Protected selectMenuPlaceholder: undefined | string = undefined

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:202


stopPaginatedMessageCustomIds

stopPaginatedMessageCustomIds: string[] = PaginatedMessage.stopPaginatedMessageCustomIds

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:186


template

template: PaginatedMessageMessageOptionsUnion

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:166


wrongUserInteractionReply

Protected wrongUserInteractionReply: PaginatedMessageWrongUserInteractionReplyFunction = PaginatedMessage.wrongUserInteractionReply

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:204


defaultActions

Static defaultActions: PaginatedMessageAction[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1311


deletionStopReasons

Static deletionStopReasons: string[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1396


embedFooterSeparator

Static embedFooterSeparator: string = '•'

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1426


emitPartialDMChannelWarning

Static emitPartialDMChannelWarning: boolean = true

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1376


handlers

Static Readonly handlers: Map<string, PaginatedMessage>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1444


messages

Static Readonly messages: Map<string, PaginatedMessage>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1435


pageIndexPrefix

Static pageIndexPrefix: string = ''

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1411


selectMenuOptions

Static selectMenuOptions: PaginatedMessageSelectMenuOptionsFunction

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1471


stopPaginatedMessageCustomIds

Static stopPaginatedMessageCustomIds: string[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1390


wrongUserInteractionReply

Static wrongUserInteractionReply: PaginatedMessageWrongUserInteractionReplyFunction

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1518

Methods

addAction

addAction(action): PaginatedMessage

Parameters

NameTypeDescription
actionPaginatedMessageAction

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:421


addActions

addActions(actions): PaginatedMessage

Parameters

NameTypeDescription
actionsPaginatedMessageAction[]

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:411


addAsyncPageBuilder

addAsyncPageBuilder(builder): PaginatedMessage

Parameters

NameTypeDescription
builderMessageBuilder | (builder: MessageBuilder) => Promise<MessageBuilder>

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:548


addAsyncPageEmbed

addAsyncPageEmbed(embed): PaginatedMessage

Parameters

NameTypeDescription
embedEmbedBuilder | (builder: EmbedBuilder) => Promise<EmbedBuilder>

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:618


addAsyncPageEmbeds

addAsyncPageEmbeds(embeds): PaginatedMessage

Parameters

NameTypeDescription
embedsEmbedBuilder[] | (embed1: EmbedBuilder, embed2: EmbedBuilder, embed3: EmbedBuilder, embed4: EmbedBuilder, embed5: EmbedBuilder, embed6: EmbedBuilder, embed7: EmbedBuilder, embed8: EmbedBuilder, embed9: EmbedBuilder, embed10: EmbedBuilder) => Promise<EmbedBuilder[]>

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:760


addPage

addPage(page): PaginatedMessage

Parameters

NameTypeDescription
pagePaginatedMessagePage

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:463


addPageBuilder

addPageBuilder(builder): PaginatedMessage

Parameters

NameTypeDescription
builderMessageBuilder | (builder: MessageBuilder) => MessageBuilder

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:522


addPageContent

addPageContent(content): PaginatedMessage

Parameters

NameTypeDescription
contentstring

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:563


addPageEmbed

addPageEmbed(embed): PaginatedMessage

Parameters

NameTypeDescription
embedEmbedBuilder | (embed: EmbedBuilder) => EmbedBuilder

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:595


addPageEmbeds

addPageEmbeds(embeds): PaginatedMessage

Parameters

NameTypeDescription
embedsEmbedBuilder[] | (embed1: EmbedBuilder, embed2: EmbedBuilder, embed3: EmbedBuilder, embed4: EmbedBuilder, embed5: EmbedBuilder, embed6: EmbedBuilder, embed7: EmbedBuilder, embed8: EmbedBuilder, embed9: EmbedBuilder, embed10: EmbedBuilder) => EmbedBuilder[]

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:669


addPages

addPages(pages): PaginatedMessage

Parameters

NameTypeDescription
pagesPaginatedMessagePage[]

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:804


applyFooter

Protected applyFooter(message, index): PaginatedMessageMessageOptionsUnion

Parameters

NameTypeDescription
messagePaginatedMessageMessageOptionsUnion
indexnumber

Returns

PaginatedMessageMessageOptionsUnion

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1188


applyTemplate

Private applyTemplate(template, options): PaginatedMessageMessageOptionsUnion

Parameters

NameType
templatePaginatedMessageMessageOptionsUnion
optionsPaginatedMessageMessageOptionsUnion

Returns

PaginatedMessageMessageOptionsUnion

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1240


applyTemplateEmbed

Private applyTemplateEmbed(templateEmbed, pageEmbeds): undefined | (APIEmbed | JSONEncodable<APIEmbed>)[]

Parameters

NameType
templateEmbedundefined | (APIEmbed | JSONEncodable<APIEmbed>)[]
pageEmbedsundefined | (APIEmbed | JSONEncodable<APIEmbed>)[]

Returns

undefined | (APIEmbed | JSONEncodable<APIEmbed>)[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1249


clone

clone(): PaginatedMessage

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:963


handleCollect

Protected handleCollect(targetUser, channel, interaction): Promise<void>

Parameters

NameTypeDescription
targetUserUser
channelDMChannel | PartialDMChannel | NewsChannel | TextChannel | VoiceChannel | PrivateThreadChannel | PublicThreadChannel<boolean>
interactionStringSelectMenuInteraction<CacheType> | ButtonInteraction<CacheType>

Returns

Promise<void>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1097


handleEnd

Protected handleEnd(_, reason): Promise<void>

Parameters

NameTypeDescription
_Collection<string, StringSelectMenuInteraction<CacheType> | ButtonInteraction<CacheType>>-
reasonPaginatedMessageStopReasons

Returns

Promise<void>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1152


handlePageLoad

Protected handlePageLoad(page, index): Promise<PaginatedMessageMessageOptionsUnion>

Parameters

NameTypeDescription
pagePaginatedMessagePage
indexnumber

Returns

Promise<PaginatedMessageMessageOptionsUnion>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1077


hasPage

hasPage(index): boolean

Parameters

NameTypeDescription
indexnumber

Returns

boolean

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:438


mergeArrays

Private mergeArrays<T>(template?, array?): undefined | T[]

Type parameters

Name
T

Parameters

NameType
template?T[]
array?T[]

Returns

undefined | T[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1296


mergeEmbeds

Private mergeEmbeds(templateEmbed, pageEmbeds): (APIEmbed | JSONEncodable<APIEmbed>)[]

Parameters

NameType
templateEmbedAPIEmbed | JSONEncodable<APIEmbed>
pageEmbeds(APIEmbed | JSONEncodable<APIEmbed>)[]

Returns

(APIEmbed | JSONEncodable<APIEmbed>)[]

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1264


resolvePage

resolvePage(index): Promise<PaginatedMessagePage>

Parameters

NameTypeDescription
indexnumber

Returns

Promise<PaginatedMessagePage>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:946


resolvePagesOnRun

resolvePagesOnRun(): Promise<void>

Returns

Promise<void>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:936


resolvePaginatedMessageInternationalizationContext

Protected resolvePaginatedMessageInternationalizationContext(messageOrInteraction, targetUser): PaginatedMessageInternationalizationContext

Parameters

NameTypeDescription
messageOrInteractionMessage<boolean> | AnyInteractableInteraction
targetUserUser

Returns

PaginatedMessageInternationalizationContext

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1225


run

run(messageOrInteraction, target?): Promise<PaginatedMessage>

Parameters

NameTypeDescription
messageOrInteractionMessage<boolean> | AnyInteractableInteraction
target?User

Returns

Promise<PaginatedMessage>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:827


setActions

setActions(actions, includeDefaultActions?): PaginatedMessage

Parameters

NameTypeDefault valueDescription
actionsPaginatedMessageAction[]undefined
includeDefaultActionsbooleanfalse

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:401


setEmitPartialDMChannelWarning

setEmitPartialDMChannelWarning(emitPartialDMChannelWarning): PaginatedMessage

Parameters

NameTypeDescription
emitPartialDMChannelWarningboolean

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:312


setIdle

setIdle(idle): PaginatedMessage

Parameters

NameTypeDescription
idlenumber

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:330


setIndex

setIndex(index): PaginatedMessage

Parameters

NameTypeDescription
indexnumber

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:321


setPages

setPages(pages): PaginatedMessage

Parameters

NameTypeDescription
pagesPaginatedMessagePage[]

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:446


setSelectMenuOptions

setSelectMenuOptions(newOptions): PaginatedMessage

Parameters

NameTypeDescription
newOptionsPaginatedMessageSelectMenuOptionsFunction

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:268


setSelectMenuPlaceholder

setSelectMenuPlaceholder(placeholder): PaginatedMessage

Parameters

NameTypeDescription
placeholderundefined | string

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:279


setStopPaginatedMessageCustomIds

setStopPaginatedMessageCustomIds(stopPaginatedMessageCustomIds): PaginatedMessage

Parameters

NameTypeDescription
stopPaginatedMessageCustomIdsstring[]

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:301


setUpCollector

Protected setUpCollector(channel, targetUser): void

Parameters

NameTypeDescription
channelTextBasedChannel
targetUserUser

Returns

void

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1045


setUpMessage

Protected setUpMessage(messageOrInteraction, targetUser): Promise<void>

Parameters

NameTypeDescription
messageOrInteractionMessage<boolean> | AnyInteractableInteraction
targetUserUser

Returns

Promise<void>

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:981


setWrongUserInteractionReply

setWrongUserInteractionReply(wrongUserInteractionReply): PaginatedMessage

Parameters

NameTypeDescription
wrongUserInteractionReplyPaginatedMessageWrongUserInteractionReplyFunction

Returns

PaginatedMessage

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:290


resolveTemplate

Static Private resolveTemplate(template?): BaseMessageOptions

Parameters

NameType
template?BaseMessageOptions | EmbedBuilder

Returns

BaseMessageOptions

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts:1524