Skip to main content

Class: PaginatedMessage

discord.js-utilities/src.PaginatedMessage

Hierarchy

Constructors

constructor

new PaginatedMessage(__namedParameters?)

Parameters

NameTypeDescription
__namedParametersPaginatedMessageOptions

Defined in

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

Properties

#thisMazeWasNotMeantForYouContent

Private #thisMazeWasNotMeantForYouContent: Object

Type declaration

NameType
contentstring

Defined in

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


actions

actions: Map<string, PaginatedMessageAction>

Defined in

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


collector

collector: null | InteractionCollector<MessageComponentInteraction<CacheType>> = null

Defined in

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


constructor

constructor: typeof PaginatedMessage

Defined in

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


embedFooterSeparator

embedFooterSeparator: string = PaginatedMessage.embedFooterSeparator

Defined in

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


emitPartialDMChannelWarning

emitPartialDMChannelWarning: boolean = PaginatedMessage.emitPartialDMChannelWarning

Defined in

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


hasEmittedMaxPageWarning

Protected hasEmittedMaxPageWarning: boolean = false

Defined in

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


hasEmittedPartialDMChannelWarning

Protected hasEmittedPartialDMChannelWarning: boolean = false

Defined in

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


idle

idle: number

Defined in

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


index

index: number = 0

Defined in

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


messages

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

Defined in

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


pageIndexPrefix

pageIndexPrefix: string = PaginatedMessage.pageIndexPrefix

Defined in

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


pages

pages: PaginatedMessagePage[]

Defined in

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


paginatedMessageData

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

Defined in

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


response

response: null | Message<boolean> | APIMessage | CommandInteraction<CacheType> | ContextMenuInteraction<CacheType> | ButtonInteraction<CacheType> | SelectMenuInteraction<CacheType> = null

Defined in

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


selectMenuOptions

Protected selectMenuOptions: PaginatedMessageSelectMenuOptionsFunction = PaginatedMessage.selectMenuOptions

Defined in

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


selectMenuPlaceholder

Protected selectMenuPlaceholder: undefined | string = undefined

Defined in

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


stopPaginatedMessageCustomIds

stopPaginatedMessageCustomIds: string[] = PaginatedMessage.stopPaginatedMessageCustomIds

Defined in

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


template

template: PaginatedMessageMessageOptionsUnion

Defined in

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


wrongUserInteractionReply

Protected wrongUserInteractionReply: PaginatedMessageWrongUserInteractionReplyFunction = PaginatedMessage.wrongUserInteractionReply

Defined in

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


defaultActions

Static defaultActions: PaginatedMessageAction[]

Defined in

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


deletionStopReasons

Static deletionStopReasons: string[]

Defined in

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


embedFooterSeparator

Static embedFooterSeparator: string = '•'

Defined in

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


emitPartialDMChannelWarning

Static emitPartialDMChannelWarning: boolean = true

Defined in

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


handlers

Static Readonly handlers: Map<string, PaginatedMessage>

Defined in

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


messages

Static Readonly messages: Map<string, PaginatedMessage>

Defined in

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


pageIndexPrefix

Static pageIndexPrefix: string = ''

Defined in

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


selectMenuOptions

Static selectMenuOptions: PaginatedMessageSelectMenuOptionsFunction

Defined in

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


stopPaginatedMessageCustomIds

Static stopPaginatedMessageCustomIds: string[]

Defined in

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


wrongUserInteractionReply

Static wrongUserInteractionReply: PaginatedMessageWrongUserInteractionReplyFunction

Defined in

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

Methods

addAction

addAction(action): PaginatedMessage

Parameters

NameTypeDescription
actionPaginatedMessageAction

Returns

PaginatedMessage

Defined in

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


addActions

addActions(actions): PaginatedMessage

Parameters

NameTypeDescription
actionsPaginatedMessageAction[]

Returns

PaginatedMessage

Defined in

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


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:542


addAsyncPageEmbed

addAsyncPageEmbed(embed): PaginatedMessage

Parameters

NameTypeDescription
embedMessageEmbed | (builder: MessageEmbed) => Promise<MessageEmbed>

Returns

PaginatedMessage

Defined in

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


addAsyncPageEmbeds

addAsyncPageEmbeds(embeds): PaginatedMessage

Parameters

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

Returns

PaginatedMessage

Defined in

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


addPage

addPage(page): PaginatedMessage

Parameters

NameTypeDescription
pagePaginatedMessagePage

Returns

PaginatedMessage

Defined in

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


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:516


addPageContent

addPageContent(content): PaginatedMessage

Parameters

NameTypeDescription
contentstring

Returns

PaginatedMessage

Defined in

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


addPageEmbed

addPageEmbed(embed): PaginatedMessage

Parameters

NameTypeDescription
embedMessageEmbed | (embed: MessageEmbed) => MessageEmbed

Returns

PaginatedMessage

Defined in

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


addPageEmbeds

addPageEmbeds(embeds): PaginatedMessage

Parameters

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

Returns

PaginatedMessage

Defined in

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


addPages

addPages(pages): PaginatedMessage

Parameters

NameTypeDescription
pagesPaginatedMessagePage[]

Returns

PaginatedMessage

Defined in

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


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:1176


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:1233


applyTemplateEmbed

Private applyTemplateEmbed(templateEmbed, pageEmbeds): undefined | (MessageEmbed | MessageEmbedOptions | APIEmbed)[]

Parameters

NameType
templateEmbedundefined | (MessageEmbed | MessageEmbedOptions | APIEmbed)[]
pageEmbedsundefined | (MessageEmbed | MessageEmbedOptions | APIEmbed)[]

Returns

undefined | (MessageEmbed | MessageEmbedOptions | APIEmbed)[]

Defined in

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


clone

clone(): PaginatedMessage

Returns

PaginatedMessage

Defined in

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


handleCollect

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

Parameters

NameTypeDescription
targetUserUser
channelDMChannel | PartialDMChannel | NewsChannel | TextChannel | ThreadChannel | VoiceChannel
interactionButtonInteraction<CacheType> | SelectMenuInteraction<CacheType>

Returns

Promise<void>

Defined in

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


handleEnd

Protected handleEnd(_, reason): void

Parameters

NameTypeDescription
_Collection<string, ButtonInteraction<CacheType> | SelectMenuInteraction<CacheType>>-
reasonstring

Returns

void

Defined in

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


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:1078


hasPage

hasPage(index): boolean

Parameters

NameTypeDescription
indexnumber

Returns

boolean

Defined in

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


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:1285


mergeEmbeds

Private mergeEmbeds(templateEmbed, pageEmbeds): (MessageEmbed | MessageEmbedOptions | APIEmbed)[]

Parameters

NameType
templateEmbedMessageEmbed | MessageEmbedOptions | APIEmbed
pageEmbeds(MessageEmbed | MessageEmbedOptions | APIEmbed)[]

Returns

(MessageEmbed | MessageEmbedOptions | APIEmbed)[]

Defined in

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


resolvePage

resolvePage(index): Promise<PaginatedMessagePage>

Parameters

NameTypeDescription
indexnumber

Returns

Promise<PaginatedMessagePage>

Defined in

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


resolvePagesOnRun

resolvePagesOnRun(): Promise<void>

Returns

Promise<void>

Defined in

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


resolvePaginatedMessageInternationalizationContext

Protected resolvePaginatedMessageInternationalizationContext(messageOrInteraction, targetUser): PaginatedMessageInternationalizationContext

Parameters

NameTypeDescription
messageOrInteractionMessage<boolean> | CommandInteraction<CacheType> | ContextMenuInteraction<CacheType> | ButtonInteraction<CacheType> | SelectMenuInteraction<CacheType>
targetUserUser

Returns

PaginatedMessageInternationalizationContext

Defined in

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


run

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

Parameters

NameTypeDescription
messageOrInteractionMessage<boolean> | CommandInteraction<CacheType> | ContextMenuInteraction<CacheType> | ButtonInteraction<CacheType> | SelectMenuInteraction<CacheType>
target?User

Returns

Promise<PaginatedMessage>

Defined in

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


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:395


setEmitPartialDMChannelWarning

setEmitPartialDMChannelWarning(emitPartialDMChannelWarning): PaginatedMessage

Parameters

NameTypeDescription
emitPartialDMChannelWarningboolean

Returns

PaginatedMessage

Defined in

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


setIdle

setIdle(idle): PaginatedMessage

Parameters

NameTypeDescription
idlenumber

Returns

PaginatedMessage

Defined in

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


setIndex

setIndex(index): PaginatedMessage

Parameters

NameTypeDescription
indexnumber

Returns

PaginatedMessage

Defined in

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


setPages

setPages(pages): PaginatedMessage

Parameters

NameTypeDescription
pagesPaginatedMessagePage[]

Returns

PaginatedMessage

Defined in

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


setSelectMenuOptions

setSelectMenuOptions(newOptions): PaginatedMessage

Parameters

NameTypeDescription
newOptionsPaginatedMessageSelectMenuOptionsFunction

Returns

PaginatedMessage

Defined in

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


setSelectMenuPlaceholder

setSelectMenuPlaceholder(placeholder): PaginatedMessage

Parameters

NameTypeDescription
placeholderundefined | string

Returns

PaginatedMessage

Defined in

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


setStopPaginatedMessageCustomIds

setStopPaginatedMessageCustomIds(stopPaginatedMessageCustomIds): PaginatedMessage

Parameters

NameTypeDescription
stopPaginatedMessageCustomIdsstring[]

Returns

PaginatedMessage

Defined in

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


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> | CommandInteraction<CacheType> | ContextMenuInteraction<CacheType> | ButtonInteraction<CacheType> | SelectMenuInteraction<CacheType>
targetUserUser

Returns

Promise<void>

Defined in

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


setWrongUserInteractionReply

setWrongUserInteractionReply(wrongUserInteractionReply): PaginatedMessage

Parameters

NameTypeDescription
wrongUserInteractionReplyPaginatedMessageWrongUserInteractionReplyFunction

Returns

PaginatedMessage

Defined in

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


resolveTemplate

Static Private resolveTemplate(template?): MessageOptions

Parameters

NameType
template?MessageEmbed | MessageOptions

Returns

MessageOptions

Defined in

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