-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.d.ts
41 lines (37 loc) · 2.21 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { Message, EmbedOptions } from 'eris';
declare module 'eris-pagination' {
/**
* An optional options object for overwriting defaults
*/
interface PaginationOptions {
/** Whether or not to show the current page index over the embed. Defaults to: true */
showPageNumbers?: boolean;
/** Whether or not to show extended control buttons besides standard pagination (First & Last page, deleting) */
extendedButtons?: boolean;
/** Cycle through all embeds jumping from the first page to the last page on going back and from the last page to the first page going forth. Defaults to: false */
cycling?: boolean;
/** How often the reaction handler should listen for a reaction (How often the paginator can be used). Defaults to: 50. Maximum: 100 */
maxMatches?: number;
/** How long the paginator should work before the reaction listener times out. Defaults to: 300000ms (5 minutes). Maximum: 900000ms (15 minutes) */
timeout?: number;
/** Emoji which should be used as the delete button. This MUST be a unicode emoji! Defaults to: 🗑 */
deleteButton?: string;
/** Emoji which should be used as the first page button. This MUST be a unicode emoji! Defaults to: ⏮ */
firstButton?: string;
/** Emoji which should be used as the last page button. This MUST be a unicode emoji! Defaults to: ⏭ */
lastButton?: string;
/** Emoji which should be used as the back button. This MUST be a unicode emoji! Defaults to: ⬅ */
backButton?: string;
/** Emoji which should be used as the forth button. This MUST be a unicode emoji! Defaults to: ➡ */
forthButton?: string;
/** Which page of the submitted embed array should be shown first. Defaults to: 1 (The 1st page / element in the array) */
startPage?: number;
}
/**
* Create an Embed Paginator
* @param message A message object emitted from a messageCreate event coming from Eris, used as an invoker. If sent by the client, the message will be edited.
* @param pages An array containing all embed objects
* @param options An optional options object for overwriting defaults
*/
function createPaginationEmbed(message: Message, pages: EmbedOptions[], options?: PaginationOptions): Promise<Message>;
}