Paginator
Constructors
Constructor
new Paginator(
pages
,__namedParameters
):Paginator
Parameters
Parameter | Type | Description |
---|---|---|
pages | MessagePayloadObject [] | The pages to display in the paginator, with no limit on the amount of pages |
__namedParameters | { client : Client ; timeoutDuration? : number ; userId? : string ; } | - |
__namedParameters.client | Client | - |
__namedParameters.timeoutDuration? | number | - |
__namedParameters.userId? | string | - |
Returns
Paginator
Properties
Property | Modifier | Type | Default value | Description |
---|---|---|---|---|
currentPage | protected | number | 0 | - |
id | readonly | string | undefined | - |
pages | readonly | MessagePayloadObject [] | undefined | - |
userId? | readonly | string | undefined | The user ID who is allowed to interact with the paginator |
Methods
destroy()
destroy():
void
Returns
void
getInitialPage()
getInitialPage():
MessagePayloadObject
Returns
goToPage()
goToPage(
pageIndex
,interaction
):Promise
<undefined
|Message
<false
>>
Parameters
Parameter | Type |
---|---|
pageIndex | number |
interaction | ButtonInteraction |
Returns
Promise
<undefined
| Message
<false
>>
send()
send(
interaction
):Promise
<void
>
Sends the paginator message using the provided interaction
Parameters
Parameter | Type | Description |
---|---|---|
interaction | CommandInteraction | The interaction to use for sending the message |
Returns
Promise
<void
>