Skip to main content

Interface: PaginatedMessageAction

@sapphire/discord.js-utilities.PaginatedMessageAction

To utilize actions you can use the PaginatedMessageAction by implementing it into a class.

example

class ForwardAction implements IPaginatedMessageAction {
public id = 'โ–ถ๏ธ';

public run({ handler }) {
if (handler.index !== handler.pages.length - 1) ++handler.index;
}
}

// You can also give the object directly.

const StopAction: IPaginatedMessageAction {
customId: 'CustomStopAction',
emoji: 'โน๏ธ',
run: ({ collector }) => {
collector.stop();
}
}

Hierarchy

  • Omit<InteractionButtonOptions, "customId" | "style">

  • Omit<MessageSelectMenuOptions, "customId">

    โ†ณ PaginatedMessageAction

Properties

customId

โ€ข customId: string

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessageTypes.ts:48


disabled

โ€ข Optional disabled: boolean

Inherited from

Omit.disabled

Defined in

node_modules/discord.js/typings/index.d.ts:4460


emoji

โ€ข Optional emoji: EmojiIdentifierResolvable

Inherited from

Omit.emoji

Defined in

node_modules/discord.js/typings/index.d.ts:4461


label

โ€ข Optional label: string

Inherited from

Omit.label

Defined in

node_modules/discord.js/typings/index.d.ts:4462


maxValues

โ€ข Optional maxValues: number

Inherited from

Omit.maxValues

Defined in

node_modules/discord.js/typings/index.d.ts:4641


minValues

โ€ข Optional minValues: number

Inherited from

Omit.minValues

Defined in

node_modules/discord.js/typings/index.d.ts:4642


options

โ€ข Optional options: MessageSelectOptionData[]

Inherited from

Omit.options

Defined in

node_modules/discord.js/typings/index.d.ts:4643


placeholder

โ€ข Optional placeholder: string

Inherited from

Omit.placeholder

Defined in

node_modules/discord.js/typings/index.d.ts:4644


style

โ€ข Optional style: ExcludeEnum<typeof MessageButtonStyles, "LINK">

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessageTypes.ts:50


type

โ€ข type: MessageComponentTypes

Overrides

Omit.type

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessageTypes.ts:49

Methods

run

โ–ธ run(context): unknown

Parameters

NameType
contextPaginatedMessageActionContext

Returns

unknown

Defined in

projects/utilities/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessageTypes.ts:51