@mostfeatured/dbi 0.0.55 → 0.0.57
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.
- package/dist/DBI.d.ts +156 -156
- package/dist/DBI.js +332 -332
- package/dist/Events.d.ts +53 -53
- package/dist/Events.js +58 -58
- package/dist/data/eventMap.json +234 -234
- package/dist/index.d.ts +6 -6
- package/dist/index.js +16 -16
- package/dist/methods/hookEventListeners.d.ts +3 -3
- package/dist/methods/hookEventListeners.js +87 -87
- package/dist/methods/hookInteractionListeners.d.ts +3 -3
- package/dist/methods/hookInteractionListeners.d.ts.map +1 -1
- package/dist/methods/hookInteractionListeners.js +125 -118
- package/dist/methods/hookInteractionListeners.js.map +1 -1
- package/dist/methods/publishInteractions.d.ts +7 -7
- package/dist/methods/publishInteractions.js +238 -238
- package/dist/types/Button.d.ts +18 -18
- package/dist/types/Button.js +31 -31
- package/dist/types/ButtonBuilder.d.ts +29 -29
- package/dist/types/ButtonBuilder.js +42 -42
- package/dist/types/ChatInput/ChatInput.d.ts +15 -15
- package/dist/types/ChatInput/ChatInput.js +20 -20
- package/dist/types/ChatInput/ChatInputOptions.d.ts +162 -162
- package/dist/types/ChatInput/ChatInputOptions.js +161 -161
- package/dist/types/CustomEvent.d.ts +13 -13
- package/dist/types/CustomEvent.js +19 -19
- package/dist/types/Event.d.ts +263 -263
- package/dist/types/Event.js +22 -22
- package/dist/types/Interaction.d.ts +47 -47
- package/dist/types/Interaction.js +24 -24
- package/dist/types/InteractionLocale.d.ts +25 -25
- package/dist/types/InteractionLocale.js +14 -14
- package/dist/types/Locale.d.ts +21 -21
- package/dist/types/Locale.js +38 -38
- package/dist/types/MessageContextMenu.d.ts +14 -14
- package/dist/types/MessageContextMenu.js +18 -18
- package/dist/types/Modal.d.ts +22 -22
- package/dist/types/Modal.js +29 -29
- package/dist/types/ModalBuilder.d.ts +30 -30
- package/dist/types/ModalBuilder.js +42 -42
- package/dist/types/SelectMenu.d.ts +18 -18
- package/dist/types/SelectMenu.d.ts.map +1 -1
- package/dist/types/SelectMenu.js +31 -31
- package/dist/types/SelectMenu.js.map +1 -1
- package/dist/types/SelectMenuBuilder.d.ts +27 -27
- package/dist/types/SelectMenuBuilder.d.ts.map +1 -1
- package/dist/types/SelectMenuBuilder.js +42 -42
- package/dist/types/SelectMenuBuilder.js.map +1 -1
- package/dist/types/UserContextMenu.d.ts +14 -14
- package/dist/types/UserContextMenu.js +18 -18
- package/dist/utils/MemoryStore.d.ts +8 -8
- package/dist/utils/MemoryStore.js +29 -29
- package/dist/utils/UtilTypes.d.ts +7 -7
- package/dist/utils/UtilTypes.js +2 -2
- package/dist/utils/customId.d.ts +7 -7
- package/dist/utils/customId.js +45 -45
- package/dist/utils/permissions.d.ts +2 -2
- package/dist/utils/permissions.js +8 -8
- package/dist/utils/recursiveImport.d.ts +4 -4
- package/dist/utils/recursiveImport.js +26 -26
- package/package.json +1 -1
- package/readme.md +5 -5
- package/src/methods/hookInteractionListeners.ts +7 -0
- package/src/types/SelectMenu.ts +2 -2
- package/src/types/SelectMenuBuilder.ts +3 -3
- package/test.js +0 -34
|
@@ -1,162 +1,162 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DBIChatInputOptions = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const discord_js_1 = tslib_1.__importDefault(require("discord.js"));
|
|
6
|
-
class DBIChatInputOptions {
|
|
7
|
-
dbi;
|
|
8
|
-
constructor(dbi) {
|
|
9
|
-
this.dbi = dbi;
|
|
10
|
-
}
|
|
11
|
-
stringAutocomplete(cfg) {
|
|
12
|
-
return {
|
|
13
|
-
type: discord_js_1.default.ApplicationCommandOptionType.String,
|
|
14
|
-
name: cfg.name,
|
|
15
|
-
autocomplete: true,
|
|
16
|
-
onComplete: cfg.onComplete,
|
|
17
|
-
description: cfg.description,
|
|
18
|
-
maxLength: cfg.maxLength,
|
|
19
|
-
minLength: cfg.minLength,
|
|
20
|
-
required: cfg.required
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
stringChoices(cfg) {
|
|
24
|
-
return {
|
|
25
|
-
type: discord_js_1.default.ApplicationCommandOptionType.String,
|
|
26
|
-
name: cfg.name,
|
|
27
|
-
choices: cfg.choices,
|
|
28
|
-
description: cfg.description,
|
|
29
|
-
maxLength: cfg.maxLength,
|
|
30
|
-
minLength: cfg.minLength,
|
|
31
|
-
required: cfg.required
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
string(cfg) {
|
|
35
|
-
return {
|
|
36
|
-
type: discord_js_1.default.ApplicationCommandOptionType.String,
|
|
37
|
-
name: cfg.name,
|
|
38
|
-
description: cfg.description,
|
|
39
|
-
maxLength: cfg.maxLength,
|
|
40
|
-
minLength: cfg.minLength,
|
|
41
|
-
required: cfg.required
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
numberAutocomplete(cfg) {
|
|
45
|
-
return {
|
|
46
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Number,
|
|
47
|
-
name: cfg.name,
|
|
48
|
-
autocomplete: true,
|
|
49
|
-
onComplete: cfg.onComplete,
|
|
50
|
-
description: cfg.description,
|
|
51
|
-
maxValue: cfg.maxValue,
|
|
52
|
-
minValue: cfg.minValue,
|
|
53
|
-
required: cfg.required
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
numberChoices(cfg) {
|
|
57
|
-
return {
|
|
58
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Number,
|
|
59
|
-
name: cfg.name,
|
|
60
|
-
choices: cfg.choices,
|
|
61
|
-
description: cfg.description,
|
|
62
|
-
maxValue: cfg.maxValue,
|
|
63
|
-
minValue: cfg.minValue,
|
|
64
|
-
required: cfg.required
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
number(cfg) {
|
|
68
|
-
return {
|
|
69
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Number,
|
|
70
|
-
name: cfg.name,
|
|
71
|
-
description: cfg.description,
|
|
72
|
-
maxValue: cfg.maxValue,
|
|
73
|
-
minValue: cfg.minValue,
|
|
74
|
-
required: cfg.required
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
integerAutocomplete(cfg) {
|
|
78
|
-
return {
|
|
79
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Integer,
|
|
80
|
-
name: cfg.name,
|
|
81
|
-
autocomplete: true,
|
|
82
|
-
onComplete: cfg.onComplete,
|
|
83
|
-
description: cfg.description,
|
|
84
|
-
maxValue: cfg.maxValue,
|
|
85
|
-
minValue: cfg.minValue,
|
|
86
|
-
required: cfg.required
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
integerChoices(cfg) {
|
|
90
|
-
return {
|
|
91
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Integer,
|
|
92
|
-
name: cfg.name,
|
|
93
|
-
choices: cfg.choices,
|
|
94
|
-
description: cfg.description,
|
|
95
|
-
maxValue: cfg.maxValue,
|
|
96
|
-
minValue: cfg.minValue,
|
|
97
|
-
required: cfg.required
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
integer(cfg) {
|
|
101
|
-
return {
|
|
102
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Integer,
|
|
103
|
-
name: cfg.name,
|
|
104
|
-
description: cfg.description,
|
|
105
|
-
maxValue: cfg.maxValue,
|
|
106
|
-
minValue: cfg.minValue,
|
|
107
|
-
required: cfg.required
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
boolean(cfg) {
|
|
111
|
-
return {
|
|
112
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Boolean,
|
|
113
|
-
name: cfg.name,
|
|
114
|
-
description: cfg.description,
|
|
115
|
-
required: cfg.required
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
attachment(cfg) {
|
|
119
|
-
return {
|
|
120
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Attachment,
|
|
121
|
-
name: cfg.name,
|
|
122
|
-
description: cfg.description,
|
|
123
|
-
required: cfg.required
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
channel(cfg) {
|
|
127
|
-
return {
|
|
128
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Channel,
|
|
129
|
-
name: cfg.name,
|
|
130
|
-
description: cfg.description,
|
|
131
|
-
channelTypes: cfg.channelTypes,
|
|
132
|
-
channel_types: cfg.channelTypes,
|
|
133
|
-
required: cfg.required
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
role(cfg) {
|
|
137
|
-
return {
|
|
138
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Role,
|
|
139
|
-
name: cfg.name,
|
|
140
|
-
description: cfg.description,
|
|
141
|
-
required: cfg.required
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
mentionable(cfg) {
|
|
145
|
-
return {
|
|
146
|
-
type: discord_js_1.default.ApplicationCommandOptionType.Mentionable,
|
|
147
|
-
name: cfg.name,
|
|
148
|
-
description: cfg.description,
|
|
149
|
-
required: cfg.required
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
user(cfg) {
|
|
153
|
-
return {
|
|
154
|
-
type: discord_js_1.default.ApplicationCommandOptionType.User,
|
|
155
|
-
name: cfg.name,
|
|
156
|
-
description: cfg.description,
|
|
157
|
-
required: cfg.required
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
exports.DBIChatInputOptions = DBIChatInputOptions;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DBIChatInputOptions = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const discord_js_1 = tslib_1.__importDefault(require("discord.js"));
|
|
6
|
+
class DBIChatInputOptions {
|
|
7
|
+
dbi;
|
|
8
|
+
constructor(dbi) {
|
|
9
|
+
this.dbi = dbi;
|
|
10
|
+
}
|
|
11
|
+
stringAutocomplete(cfg) {
|
|
12
|
+
return {
|
|
13
|
+
type: discord_js_1.default.ApplicationCommandOptionType.String,
|
|
14
|
+
name: cfg.name,
|
|
15
|
+
autocomplete: true,
|
|
16
|
+
onComplete: cfg.onComplete,
|
|
17
|
+
description: cfg.description,
|
|
18
|
+
maxLength: cfg.maxLength,
|
|
19
|
+
minLength: cfg.minLength,
|
|
20
|
+
required: cfg.required
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
stringChoices(cfg) {
|
|
24
|
+
return {
|
|
25
|
+
type: discord_js_1.default.ApplicationCommandOptionType.String,
|
|
26
|
+
name: cfg.name,
|
|
27
|
+
choices: cfg.choices,
|
|
28
|
+
description: cfg.description,
|
|
29
|
+
maxLength: cfg.maxLength,
|
|
30
|
+
minLength: cfg.minLength,
|
|
31
|
+
required: cfg.required
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
string(cfg) {
|
|
35
|
+
return {
|
|
36
|
+
type: discord_js_1.default.ApplicationCommandOptionType.String,
|
|
37
|
+
name: cfg.name,
|
|
38
|
+
description: cfg.description,
|
|
39
|
+
maxLength: cfg.maxLength,
|
|
40
|
+
minLength: cfg.minLength,
|
|
41
|
+
required: cfg.required
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
numberAutocomplete(cfg) {
|
|
45
|
+
return {
|
|
46
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Number,
|
|
47
|
+
name: cfg.name,
|
|
48
|
+
autocomplete: true,
|
|
49
|
+
onComplete: cfg.onComplete,
|
|
50
|
+
description: cfg.description,
|
|
51
|
+
maxValue: cfg.maxValue,
|
|
52
|
+
minValue: cfg.minValue,
|
|
53
|
+
required: cfg.required
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
numberChoices(cfg) {
|
|
57
|
+
return {
|
|
58
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Number,
|
|
59
|
+
name: cfg.name,
|
|
60
|
+
choices: cfg.choices,
|
|
61
|
+
description: cfg.description,
|
|
62
|
+
maxValue: cfg.maxValue,
|
|
63
|
+
minValue: cfg.minValue,
|
|
64
|
+
required: cfg.required
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
number(cfg) {
|
|
68
|
+
return {
|
|
69
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Number,
|
|
70
|
+
name: cfg.name,
|
|
71
|
+
description: cfg.description,
|
|
72
|
+
maxValue: cfg.maxValue,
|
|
73
|
+
minValue: cfg.minValue,
|
|
74
|
+
required: cfg.required
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
integerAutocomplete(cfg) {
|
|
78
|
+
return {
|
|
79
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Integer,
|
|
80
|
+
name: cfg.name,
|
|
81
|
+
autocomplete: true,
|
|
82
|
+
onComplete: cfg.onComplete,
|
|
83
|
+
description: cfg.description,
|
|
84
|
+
maxValue: cfg.maxValue,
|
|
85
|
+
minValue: cfg.minValue,
|
|
86
|
+
required: cfg.required
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
integerChoices(cfg) {
|
|
90
|
+
return {
|
|
91
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Integer,
|
|
92
|
+
name: cfg.name,
|
|
93
|
+
choices: cfg.choices,
|
|
94
|
+
description: cfg.description,
|
|
95
|
+
maxValue: cfg.maxValue,
|
|
96
|
+
minValue: cfg.minValue,
|
|
97
|
+
required: cfg.required
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
integer(cfg) {
|
|
101
|
+
return {
|
|
102
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Integer,
|
|
103
|
+
name: cfg.name,
|
|
104
|
+
description: cfg.description,
|
|
105
|
+
maxValue: cfg.maxValue,
|
|
106
|
+
minValue: cfg.minValue,
|
|
107
|
+
required: cfg.required
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
boolean(cfg) {
|
|
111
|
+
return {
|
|
112
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Boolean,
|
|
113
|
+
name: cfg.name,
|
|
114
|
+
description: cfg.description,
|
|
115
|
+
required: cfg.required
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
attachment(cfg) {
|
|
119
|
+
return {
|
|
120
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Attachment,
|
|
121
|
+
name: cfg.name,
|
|
122
|
+
description: cfg.description,
|
|
123
|
+
required: cfg.required
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
channel(cfg) {
|
|
127
|
+
return {
|
|
128
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Channel,
|
|
129
|
+
name: cfg.name,
|
|
130
|
+
description: cfg.description,
|
|
131
|
+
channelTypes: cfg.channelTypes,
|
|
132
|
+
channel_types: cfg.channelTypes,
|
|
133
|
+
required: cfg.required
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
role(cfg) {
|
|
137
|
+
return {
|
|
138
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Role,
|
|
139
|
+
name: cfg.name,
|
|
140
|
+
description: cfg.description,
|
|
141
|
+
required: cfg.required
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
mentionable(cfg) {
|
|
145
|
+
return {
|
|
146
|
+
type: discord_js_1.default.ApplicationCommandOptionType.Mentionable,
|
|
147
|
+
name: cfg.name,
|
|
148
|
+
description: cfg.description,
|
|
149
|
+
required: cfg.required
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
user(cfg) {
|
|
153
|
+
return {
|
|
154
|
+
type: discord_js_1.default.ApplicationCommandOptionType.User,
|
|
155
|
+
name: cfg.name,
|
|
156
|
+
description: cfg.description,
|
|
157
|
+
required: cfg.required
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.DBIChatInputOptions = DBIChatInputOptions;
|
|
162
162
|
//# sourceMappingURL=ChatInputOptions.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { NamespaceEnums, NamespaceData } from "../../generated/namespaceData";
|
|
2
|
-
import { DBI } from "../DBI";
|
|
3
|
-
export declare type TDBICustomEventOmitted<TNamespace extends NamespaceEnums, CEventName extends keyof NamespaceData[TNamespace]["customEvents"] = keyof NamespaceData[TNamespace]["customEvents"]> = Omit<DBICustomEvent<TNamespace, CEventName>, "type" | "dbi" | "toJSON" | "trigger">;
|
|
4
|
-
export declare class DBICustomEvent<TNamespace extends NamespaceEnums, CEventName extends keyof NamespaceData[TNamespace]["customEvents"] = keyof NamespaceData[TNamespace]["customEvents"]> {
|
|
5
|
-
dbi: DBI<TNamespace>;
|
|
6
|
-
name: CEventName;
|
|
7
|
-
map: {
|
|
8
|
-
[key: string]: string;
|
|
9
|
-
};
|
|
10
|
-
type: string;
|
|
11
|
-
trigger(args: NamespaceData[TNamespace]["customEvents"][CEventName]): boolean;
|
|
12
|
-
constructor(dbi: DBI<TNamespace>, cfg: TDBICustomEventOmitted<TNamespace, CEventName>);
|
|
13
|
-
}
|
|
1
|
+
import { NamespaceEnums, NamespaceData } from "../../generated/namespaceData";
|
|
2
|
+
import { DBI } from "../DBI";
|
|
3
|
+
export declare type TDBICustomEventOmitted<TNamespace extends NamespaceEnums, CEventName extends keyof NamespaceData[TNamespace]["customEvents"] = keyof NamespaceData[TNamespace]["customEvents"]> = Omit<DBICustomEvent<TNamespace, CEventName>, "type" | "dbi" | "toJSON" | "trigger">;
|
|
4
|
+
export declare class DBICustomEvent<TNamespace extends NamespaceEnums, CEventName extends keyof NamespaceData[TNamespace]["customEvents"] = keyof NamespaceData[TNamespace]["customEvents"]> {
|
|
5
|
+
dbi: DBI<TNamespace>;
|
|
6
|
+
name: CEventName;
|
|
7
|
+
map: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
type: string;
|
|
11
|
+
trigger(args: NamespaceData[TNamespace]["customEvents"][CEventName]): boolean;
|
|
12
|
+
constructor(dbi: DBI<TNamespace>, cfg: TDBICustomEventOmitted<TNamespace, CEventName>);
|
|
13
|
+
}
|
|
14
14
|
//# sourceMappingURL=CustomEvent.d.ts.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DBICustomEvent = void 0;
|
|
4
|
-
class DBICustomEvent {
|
|
5
|
-
dbi;
|
|
6
|
-
name;
|
|
7
|
-
map;
|
|
8
|
-
type;
|
|
9
|
-
trigger(args) {
|
|
10
|
-
return this.dbi.client.emit(this.name, { ...args, _DIRECT_: true });
|
|
11
|
-
}
|
|
12
|
-
constructor(dbi, cfg) {
|
|
13
|
-
this.dbi = dbi;
|
|
14
|
-
this.name = cfg.name;
|
|
15
|
-
this.map = cfg.map;
|
|
16
|
-
this.type = "CustomEvent";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.DBICustomEvent = DBICustomEvent;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DBICustomEvent = void 0;
|
|
4
|
+
class DBICustomEvent {
|
|
5
|
+
dbi;
|
|
6
|
+
name;
|
|
7
|
+
map;
|
|
8
|
+
type;
|
|
9
|
+
trigger(args) {
|
|
10
|
+
return this.dbi.client.emit(this.name, { ...args, _DIRECT_: true });
|
|
11
|
+
}
|
|
12
|
+
constructor(dbi, cfg) {
|
|
13
|
+
this.dbi = dbi;
|
|
14
|
+
this.name = cfg.name;
|
|
15
|
+
this.map = cfg.map;
|
|
16
|
+
this.type = "CustomEvent";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.DBICustomEvent = DBICustomEvent;
|
|
20
20
|
//# sourceMappingURL=CustomEvent.js.map
|