@globalart/nestcord 1.7.6 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,10 +5,12 @@ import { PageBuilder } from './page.builder';
|
|
|
5
5
|
export declare class SelectMenuPaginationBuilder extends BasePaginationBuilder {
|
|
6
6
|
private items;
|
|
7
7
|
private pages;
|
|
8
|
+
private customOptions;
|
|
8
9
|
setPages(data: {
|
|
9
10
|
pageId: string;
|
|
10
11
|
builder: PageBuilder;
|
|
11
12
|
}[]): this;
|
|
13
|
+
setCustomOptions(value: string): void;
|
|
12
14
|
private getPagesMap;
|
|
13
15
|
setSelectMenuItems(value: MenuAppearance[]): this;
|
|
14
16
|
build(page: string): Promise<PageOptions>;
|
|
@@ -23,6 +23,9 @@ class SelectMenuPaginationBuilder extends base_pagination_builder_1.BasePaginati
|
|
|
23
23
|
this.pages = data;
|
|
24
24
|
return this;
|
|
25
25
|
}
|
|
26
|
+
setCustomOptions(value) {
|
|
27
|
+
this.customOptions = value;
|
|
28
|
+
}
|
|
26
29
|
getPagesMap() {
|
|
27
30
|
return new Map(this.pages.map(({ pageId, builder }) => [pageId, builder]));
|
|
28
31
|
}
|
|
@@ -42,7 +45,9 @@ class SelectMenuPaginationBuilder extends base_pagination_builder_1.BasePaginati
|
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
47
|
createMenuItems(items) {
|
|
45
|
-
return new discord_js_1.StringSelectMenuBuilder()
|
|
48
|
+
return new discord_js_1.StringSelectMenuBuilder()
|
|
49
|
+
.setCustomId(`nestcord-pagination/${this.customId}/${this.customOptions || ''}`)
|
|
50
|
+
.addOptions(items);
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
exports.SelectMenuPaginationBuilder = SelectMenuPaginationBuilder;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalart/nestcord",
|
|
3
3
|
"description": "A module for creating Discord bots using NestJS, based on Discord.js",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@nestjs/common": "10.3.9",
|
|
62
62
|
"@nestjs/core": "10.3.9",
|
|
63
63
|
"@nestjs/platform-express": "^10.3.8",
|
|
64
|
-
"@types/node": "20.14.
|
|
64
|
+
"@types/node": "20.14.9",
|
|
65
65
|
"@typescript-eslint/eslint-plugin": "7.0.0",
|
|
66
66
|
"@typescript-eslint/parser": "6.21.0",
|
|
67
67
|
"discord-api-types": "0.37.90",
|