seyfert 1.2.3 → 1.3.1
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/lib/api/Routes/channels.d.ts +15 -1
- package/lib/api/api.js +5 -1
- package/lib/api/shared.d.ts +3 -1
- package/lib/api/utils/utils.d.ts +1 -1
- package/lib/api/utils/utils.js +2 -2
- package/lib/builders/Poll.d.ts +16 -0
- package/lib/builders/Poll.js +48 -0
- package/lib/builders/index.d.ts +1 -0
- package/lib/builders/index.js +1 -0
- package/lib/cache/adapters/index.d.ts +1 -0
- package/lib/cache/adapters/index.js +1 -0
- package/lib/cache/adapters/limited.d.ts +50 -0
- package/lib/cache/adapters/limited.js +188 -0
- package/lib/cache/index.d.ts +5 -2
- package/lib/cache/index.js +38 -7
- package/lib/cache/resources/channels.d.ts +2 -1
- package/lib/cache/resources/default/base.d.ts +3 -3
- package/lib/cache/resources/default/base.js +8 -3
- package/lib/cache/resources/default/guild-based.d.ts +2 -1
- package/lib/cache/resources/default/guild-based.js +7 -3
- package/lib/cache/resources/default/guild-related.d.ts +2 -1
- package/lib/cache/resources/default/guild-related.js +7 -3
- package/lib/cache/resources/emojis.d.ts +2 -0
- package/lib/cache/resources/emojis.js +4 -0
- package/lib/cache/resources/guilds.d.ts +2 -0
- package/lib/cache/resources/guilds.js +4 -0
- package/lib/cache/resources/members.d.ts +2 -0
- package/lib/cache/resources/members.js +5 -1
- package/lib/cache/resources/messages.d.ts +15 -0
- package/lib/cache/resources/messages.js +53 -0
- package/lib/cache/resources/overwrites.d.ts +2 -0
- package/lib/cache/resources/overwrites.js +4 -0
- package/lib/cache/resources/presence.d.ts +1 -0
- package/lib/cache/resources/presence.js +4 -0
- package/lib/cache/resources/roles.d.ts +2 -0
- package/lib/cache/resources/roles.js +4 -0
- package/lib/cache/resources/stage-instances.d.ts +1 -0
- package/lib/cache/resources/stage-instances.js +5 -1
- package/lib/cache/resources/stickers.d.ts +2 -0
- package/lib/cache/resources/stickers.js +4 -0
- package/lib/cache/resources/threads.d.ts +2 -0
- package/lib/cache/resources/threads.js +4 -0
- package/lib/cache/resources/users.d.ts +2 -0
- package/lib/cache/resources/users.js +4 -0
- package/lib/cache/resources/voice-states.d.ts +2 -1
- package/lib/cache/resources/voice-states.js +8 -4
- package/lib/client/base.d.ts +25 -13
- package/lib/client/base.js +33 -8
- package/lib/client/client.d.ts +6 -5
- package/lib/client/client.js +13 -1
- package/lib/client/oninteractioncreate.js +2 -2
- package/lib/client/onmessagecreate.js +2 -2
- package/lib/client/workerclient.d.ts +3 -3
- package/lib/client/workerclient.js +18 -3
- package/lib/collection.d.ts +8 -3
- package/lib/collection.js +22 -4
- package/lib/commands/applications/chat.d.ts +8 -14
- package/lib/commands/applications/chat.js +2 -20
- package/lib/commands/applications/chatcontext.d.ts +1 -1
- package/lib/commands/applications/menucontext.d.ts +1 -1
- package/lib/commands/handler.d.ts +11 -7
- package/lib/commands/handler.js +43 -14
- package/lib/common/index.d.ts +2 -0
- package/lib/common/index.js +2 -0
- package/lib/common/it/utils.d.ts +0 -1
- package/lib/common/it/utils.js +0 -1
- package/lib/common/shorters/channels.d.ts +5 -3
- package/lib/common/shorters/channels.js +24 -10
- package/lib/common/shorters/guilds.d.ts +7 -6
- package/lib/common/shorters/guilds.js +23 -4
- package/lib/common/shorters/interaction.d.ts +13 -0
- package/lib/common/shorters/interaction.js +61 -0
- package/lib/common/shorters/messages.d.ts +6 -3
- package/lib/common/shorters/messages.js +33 -15
- package/lib/common/shorters/roles.d.ts +3 -3
- package/lib/common/shorters/roles.js +12 -17
- package/lib/common/shorters/templates.d.ts +7 -6
- package/lib/common/shorters/templates.js +28 -6
- package/lib/common/shorters/threads.d.ts +39 -0
- package/lib/common/shorters/threads.js +76 -0
- package/lib/common/shorters/webhook.d.ts +1 -1
- package/lib/common/shorters/webhook.js +8 -2
- package/lib/common/types/util.d.ts +8 -2
- package/lib/common/types/write.d.ts +8 -5
- package/lib/components/ButtonComponent.js +1 -1
- package/lib/components/componentcontext.d.ts +1 -1
- package/lib/components/handler.d.ts +6 -17
- package/lib/components/handler.js +7 -2
- package/lib/events/handler.d.ts +8 -14
- package/lib/events/handler.js +9 -4
- package/lib/events/hooks/auto_moderation.d.ts +5 -1
- package/lib/events/hooks/guild.d.ts +692 -23
- package/lib/events/hooks/guild.js +2 -2
- package/lib/events/hooks/integration.d.ts +52 -47
- package/lib/events/hooks/interactions.d.ts +1 -1
- package/lib/events/hooks/invite.d.ts +67 -3
- package/lib/events/hooks/message.d.ts +96 -12
- package/lib/events/hooks/message.js +18 -7
- package/lib/events/hooks/presence.d.ts +48 -2
- package/lib/events/hooks/thread.d.ts +155 -18
- package/lib/events/hooks/typing.d.ts +13 -1
- package/lib/events/hooks/voice.d.ts +13 -1
- package/lib/langs/handler.d.ts +4 -8
- package/lib/langs/handler.js +7 -2
- package/lib/structures/AutoModerationRule.d.ts +7 -7
- package/lib/structures/AutoModerationRule.js +2 -1
- package/lib/structures/Guild.d.ts +15 -13
- package/lib/structures/GuildRole.d.ts +5 -5
- package/lib/structures/GuildTemplate.d.ts +10 -10
- package/lib/structures/Interaction.d.ts +4 -4
- package/lib/structures/Interaction.js +27 -48
- package/lib/structures/Message.d.ts +5 -3
- package/lib/structures/Message.js +5 -0
- package/lib/structures/Poll.d.ts +15 -0
- package/lib/structures/Poll.js +26 -0
- package/lib/structures/User.js +2 -2
- package/lib/structures/Webhook.d.ts +2 -2
- package/lib/structures/channels.d.ts +6 -3
- package/lib/structures/channels.js +16 -8
- package/lib/structures/extra/Permissions.d.ts +1 -0
- package/lib/structures/index.d.ts +1 -0
- package/lib/structures/index.js +1 -0
- package/lib/websocket/SharedTypes.d.ts +7 -2
- package/lib/websocket/discord/shard.js +1 -1
- package/package.json +8 -8
|
@@ -7,13 +7,31 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
7
7
|
guildId: string;
|
|
8
8
|
channelIds?: string[] | undefined;
|
|
9
9
|
threads: ({
|
|
10
|
-
name:
|
|
10
|
+
name: undefined;
|
|
11
11
|
type: import("discord-api-types/v10").ChannelType.DM;
|
|
12
12
|
id: string;
|
|
13
13
|
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
14
14
|
lastMessageId?: string | null | undefined;
|
|
15
15
|
lastPinTimestamp?: string | null | undefined;
|
|
16
|
-
recipients?:
|
|
16
|
+
recipients?: {
|
|
17
|
+
id: string;
|
|
18
|
+
username: string;
|
|
19
|
+
discriminator: string;
|
|
20
|
+
globalName: string | null;
|
|
21
|
+
avatar: string | null;
|
|
22
|
+
bot?: boolean | undefined;
|
|
23
|
+
system?: boolean | undefined;
|
|
24
|
+
mfaEnabled?: boolean | undefined;
|
|
25
|
+
banner?: string | null | undefined;
|
|
26
|
+
accentColor?: number | null | undefined;
|
|
27
|
+
locale?: string | undefined;
|
|
28
|
+
verified?: boolean | undefined;
|
|
29
|
+
email?: string | null | undefined;
|
|
30
|
+
flags?: import("discord-api-types/v10").UserFlags | undefined;
|
|
31
|
+
premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
|
|
32
|
+
publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
|
|
33
|
+
avatarDecoration?: string | null | undefined;
|
|
34
|
+
}[] | undefined;
|
|
17
35
|
} | {
|
|
18
36
|
defaultForumLayout: import("discord-api-types/v10").ForumLayoutType;
|
|
19
37
|
topic?: string | null | undefined;
|
|
@@ -29,11 +47,19 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
29
47
|
emojiName: string | null;
|
|
30
48
|
}[];
|
|
31
49
|
defaultThreadRateLimitPerUser?: number | undefined;
|
|
32
|
-
defaultReactionEmoji:
|
|
50
|
+
defaultReactionEmoji: {
|
|
51
|
+
emojiId?: string | null | undefined;
|
|
52
|
+
emojiName?: string | null | undefined;
|
|
53
|
+
} | null;
|
|
33
54
|
defaultSortOrder: import("discord-api-types/v10").SortOrderType | null;
|
|
34
55
|
name: string;
|
|
35
56
|
guildId?: string | undefined;
|
|
36
|
-
permissionOverwrites?:
|
|
57
|
+
permissionOverwrites?: {
|
|
58
|
+
id: string;
|
|
59
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
60
|
+
allow: string;
|
|
61
|
+
deny: string;
|
|
62
|
+
}[] | undefined;
|
|
37
63
|
position: number;
|
|
38
64
|
parentId?: string | null | undefined;
|
|
39
65
|
nsfw?: boolean | undefined;
|
|
@@ -52,7 +78,12 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
52
78
|
lastPinTimestamp?: string | null | undefined;
|
|
53
79
|
name: string;
|
|
54
80
|
guildId?: string | undefined;
|
|
55
|
-
permissionOverwrites?:
|
|
81
|
+
permissionOverwrites?: {
|
|
82
|
+
id: string;
|
|
83
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
84
|
+
allow: string;
|
|
85
|
+
deny: string;
|
|
86
|
+
}[] | undefined;
|
|
56
87
|
position: number;
|
|
57
88
|
parentId?: string | null | undefined;
|
|
58
89
|
nsfw?: boolean | undefined;
|
|
@@ -67,11 +98,34 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
67
98
|
id: string;
|
|
68
99
|
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
69
100
|
lastPinTimestamp?: string | null | undefined;
|
|
70
|
-
recipients?:
|
|
101
|
+
recipients?: {
|
|
102
|
+
id: string;
|
|
103
|
+
username: string;
|
|
104
|
+
discriminator: string;
|
|
105
|
+
globalName: string | null;
|
|
106
|
+
avatar: string | null;
|
|
107
|
+
bot?: boolean | undefined;
|
|
108
|
+
system?: boolean | undefined;
|
|
109
|
+
mfaEnabled?: boolean | undefined;
|
|
110
|
+
banner?: string | null | undefined;
|
|
111
|
+
accentColor?: number | null | undefined;
|
|
112
|
+
locale?: string | undefined;
|
|
113
|
+
verified?: boolean | undefined;
|
|
114
|
+
email?: string | null | undefined;
|
|
115
|
+
flags?: import("discord-api-types/v10").UserFlags | undefined;
|
|
116
|
+
premiumType?: import("discord-api-types/v10").UserPremiumType | undefined;
|
|
117
|
+
publicFlags?: import("discord-api-types/v10").UserFlags | undefined;
|
|
118
|
+
avatarDecoration?: string | null | undefined;
|
|
119
|
+
}[] | undefined;
|
|
71
120
|
} | {
|
|
72
121
|
name: string;
|
|
73
122
|
guildId?: string | undefined;
|
|
74
|
-
permissionOverwrites?:
|
|
123
|
+
permissionOverwrites?: {
|
|
124
|
+
id: string;
|
|
125
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
126
|
+
allow: string;
|
|
127
|
+
deny: string;
|
|
128
|
+
}[] | undefined;
|
|
75
129
|
position: number;
|
|
76
130
|
parentId?: string | null | undefined;
|
|
77
131
|
nsfw?: boolean | undefined;
|
|
@@ -92,11 +146,19 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
92
146
|
emojiName: string | null;
|
|
93
147
|
}[];
|
|
94
148
|
defaultThreadRateLimitPerUser?: number | undefined;
|
|
95
|
-
defaultReactionEmoji:
|
|
149
|
+
defaultReactionEmoji: {
|
|
150
|
+
emojiId?: string | null | undefined;
|
|
151
|
+
emojiName?: string | null | undefined;
|
|
152
|
+
} | null;
|
|
96
153
|
defaultSortOrder: import("discord-api-types/v10").SortOrderType | null;
|
|
97
154
|
name: string;
|
|
98
155
|
guildId?: string | undefined;
|
|
99
|
-
permissionOverwrites?:
|
|
156
|
+
permissionOverwrites?: {
|
|
157
|
+
id: string;
|
|
158
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
159
|
+
allow: string;
|
|
160
|
+
deny: string;
|
|
161
|
+
}[] | undefined;
|
|
100
162
|
position: number;
|
|
101
163
|
parentId?: string | null | undefined;
|
|
102
164
|
nsfw?: boolean | undefined;
|
|
@@ -110,7 +172,12 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
110
172
|
videoQualityMode?: import("discord-api-types/v10").VideoQualityMode | undefined;
|
|
111
173
|
name: string;
|
|
112
174
|
guildId?: string | undefined;
|
|
113
|
-
permissionOverwrites?:
|
|
175
|
+
permissionOverwrites?: {
|
|
176
|
+
id: string;
|
|
177
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
178
|
+
allow: string;
|
|
179
|
+
deny: string;
|
|
180
|
+
}[] | undefined;
|
|
114
181
|
position: number;
|
|
115
182
|
parentId?: string | null | undefined;
|
|
116
183
|
nsfw?: boolean | undefined;
|
|
@@ -126,7 +193,12 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
126
193
|
videoQualityMode?: import("discord-api-types/v10").VideoQualityMode | undefined;
|
|
127
194
|
name: string;
|
|
128
195
|
guildId?: string | undefined;
|
|
129
|
-
permissionOverwrites?:
|
|
196
|
+
permissionOverwrites?: {
|
|
197
|
+
id: string;
|
|
198
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
199
|
+
allow: string;
|
|
200
|
+
deny: string;
|
|
201
|
+
}[] | undefined;
|
|
130
202
|
position: number;
|
|
131
203
|
parentId?: string | null | undefined;
|
|
132
204
|
nsfw?: boolean | undefined;
|
|
@@ -147,13 +219,31 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
147
219
|
lastPinTimestamp?: string | null | undefined;
|
|
148
220
|
name: string;
|
|
149
221
|
guildId?: string | undefined;
|
|
150
|
-
permissionOverwrites?:
|
|
222
|
+
permissionOverwrites?: {
|
|
223
|
+
id: string;
|
|
224
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
225
|
+
allow: string;
|
|
226
|
+
deny: string;
|
|
227
|
+
}[] | undefined;
|
|
151
228
|
position: number;
|
|
152
229
|
parentId?: string | null | undefined;
|
|
153
230
|
nsfw?: boolean | undefined;
|
|
154
231
|
} | {
|
|
155
|
-
member?:
|
|
156
|
-
|
|
232
|
+
member?: {
|
|
233
|
+
id?: string | undefined;
|
|
234
|
+
userId?: string | undefined;
|
|
235
|
+
joinTimestamp?: string | undefined;
|
|
236
|
+
flags?: import("discord-api-types/v10").ThreadMemberFlags | undefined;
|
|
237
|
+
member?: import("discord-api-types/v10").APIGuildMember | undefined;
|
|
238
|
+
} | undefined;
|
|
239
|
+
threadMetadata?: {
|
|
240
|
+
archived?: boolean | undefined;
|
|
241
|
+
autoArchiveDuration?: import("discord-api-types/v10").ThreadAutoArchiveDuration | undefined;
|
|
242
|
+
archiveTimestamp?: string | undefined;
|
|
243
|
+
locked?: boolean | undefined;
|
|
244
|
+
invitable?: boolean | undefined;
|
|
245
|
+
createTimestamp?: string | undefined;
|
|
246
|
+
} | undefined;
|
|
157
247
|
messageCount?: number | undefined;
|
|
158
248
|
memberCount?: number | undefined;
|
|
159
249
|
ownerId?: string | undefined;
|
|
@@ -167,7 +257,12 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
167
257
|
lastPinTimestamp?: string | null | undefined;
|
|
168
258
|
name: string;
|
|
169
259
|
guildId?: string | undefined;
|
|
170
|
-
permissionOverwrites?:
|
|
260
|
+
permissionOverwrites?: {
|
|
261
|
+
id: string;
|
|
262
|
+
type: import("discord-api-types/v10").OverwriteType;
|
|
263
|
+
allow: string;
|
|
264
|
+
deny: string;
|
|
265
|
+
}[] | undefined;
|
|
171
266
|
position: number;
|
|
172
267
|
parentId?: string | null | undefined;
|
|
173
268
|
nsfw?: boolean | undefined;
|
|
@@ -177,7 +272,19 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
177
272
|
userId?: string | undefined;
|
|
178
273
|
joinTimestamp: string;
|
|
179
274
|
flags: import("discord-api-types/v10").ThreadMemberFlags;
|
|
180
|
-
member?:
|
|
275
|
+
member?: {
|
|
276
|
+
user?: import("discord-api-types/v10").APIUser | undefined;
|
|
277
|
+
nick?: string | null | undefined;
|
|
278
|
+
avatar?: string | null | undefined;
|
|
279
|
+
roles?: string[] | undefined;
|
|
280
|
+
joinedAt?: string | undefined;
|
|
281
|
+
premiumSince?: string | null | undefined;
|
|
282
|
+
deaf?: boolean | undefined;
|
|
283
|
+
mute?: boolean | undefined;
|
|
284
|
+
flags?: import("discord-api-types/v10").GuildMemberFlags | undefined;
|
|
285
|
+
pending?: boolean | undefined;
|
|
286
|
+
communicationDisabledUntil?: string | null | undefined;
|
|
287
|
+
} | undefined;
|
|
181
288
|
}[];
|
|
182
289
|
};
|
|
183
290
|
export declare const THREAD_MEMBER_UPDATE: (_self: BaseClient, data: GatewayThreadMemberUpdateDispatchData) => {
|
|
@@ -185,14 +292,44 @@ export declare const THREAD_MEMBER_UPDATE: (_self: BaseClient, data: GatewayThre
|
|
|
185
292
|
userId?: string | undefined;
|
|
186
293
|
joinTimestamp: string;
|
|
187
294
|
flags: import("discord-api-types/v10").ThreadMemberFlags;
|
|
188
|
-
member?:
|
|
295
|
+
member?: {
|
|
296
|
+
user?: import("discord-api-types/v10").APIUser | undefined;
|
|
297
|
+
nick?: string | null | undefined;
|
|
298
|
+
avatar?: string | null | undefined;
|
|
299
|
+
roles?: string[] | undefined;
|
|
300
|
+
joinedAt?: string | undefined;
|
|
301
|
+
premiumSince?: string | null | undefined;
|
|
302
|
+
deaf?: boolean | undefined;
|
|
303
|
+
mute?: boolean | undefined;
|
|
304
|
+
flags?: import("discord-api-types/v10").GuildMemberFlags | undefined;
|
|
305
|
+
pending?: boolean | undefined;
|
|
306
|
+
communicationDisabledUntil?: string | null | undefined;
|
|
307
|
+
} | undefined;
|
|
189
308
|
guildId: string;
|
|
190
309
|
};
|
|
191
310
|
export declare const THREAD_MEMBERS_UPDATE: (_self: BaseClient, data: GatewayThreadMembersUpdateDispatchData) => {
|
|
192
311
|
id: string;
|
|
193
312
|
guildId: string;
|
|
194
313
|
memberCount: number;
|
|
195
|
-
addedMembers?:
|
|
314
|
+
addedMembers?: {
|
|
315
|
+
id?: string | undefined;
|
|
316
|
+
userId?: string | undefined;
|
|
317
|
+
joinTimestamp: string;
|
|
318
|
+
flags: import("discord-api-types/v10").ThreadMemberFlags;
|
|
319
|
+
member?: {
|
|
320
|
+
user?: import("discord-api-types/v10").APIUser | undefined;
|
|
321
|
+
nick?: string | null | undefined;
|
|
322
|
+
avatar?: string | null | undefined;
|
|
323
|
+
roles?: string[] | undefined;
|
|
324
|
+
joinedAt?: string | undefined;
|
|
325
|
+
premiumSince?: string | null | undefined;
|
|
326
|
+
deaf?: boolean | undefined;
|
|
327
|
+
mute?: boolean | undefined;
|
|
328
|
+
flags?: import("discord-api-types/v10").GuildMemberFlags | undefined;
|
|
329
|
+
pending?: boolean | undefined;
|
|
330
|
+
communicationDisabledUntil?: string | null | undefined;
|
|
331
|
+
} | undefined;
|
|
332
|
+
}[] | undefined;
|
|
196
333
|
removedMemberIds?: string[] | undefined;
|
|
197
334
|
};
|
|
198
335
|
export declare const THREAD_UPDATE: (self: BaseClient, data: GatewayThreadUpdateDispatchData) => ThreadChannel;
|
|
@@ -6,7 +6,19 @@ export declare const TYPING_START: (self: BaseClient, data: GatewayTypingStartDi
|
|
|
6
6
|
guildId?: string | undefined;
|
|
7
7
|
userId: string;
|
|
8
8
|
timestamp: number;
|
|
9
|
-
member?:
|
|
9
|
+
member?: {
|
|
10
|
+
user?: import("discord-api-types/v10").APIUser | undefined;
|
|
11
|
+
nick?: string | null | undefined;
|
|
12
|
+
avatar?: string | null | undefined;
|
|
13
|
+
roles?: string[] | undefined;
|
|
14
|
+
joinedAt?: string | undefined;
|
|
15
|
+
premiumSince?: string | null | undefined;
|
|
16
|
+
deaf?: boolean | undefined;
|
|
17
|
+
mute?: boolean | undefined;
|
|
18
|
+
flags?: import("discord-api-types/v10").GuildMemberFlags | undefined;
|
|
19
|
+
pending?: boolean | undefined;
|
|
20
|
+
communicationDisabledUntil?: string | null | undefined;
|
|
21
|
+
} | undefined;
|
|
10
22
|
} | {
|
|
11
23
|
member: GuildMember;
|
|
12
24
|
channelId: string;
|
|
@@ -10,7 +10,19 @@ export declare const VOICE_STATE_UPDATE: (self: BaseClient, data: GatewayVoiceSt
|
|
|
10
10
|
guildId?: string | undefined;
|
|
11
11
|
channelId: string | null;
|
|
12
12
|
userId: string;
|
|
13
|
-
member?:
|
|
13
|
+
member?: {
|
|
14
|
+
user?: import("discord-api-types/v10").APIUser | undefined;
|
|
15
|
+
nick?: string | null | undefined;
|
|
16
|
+
avatar?: string | null | undefined;
|
|
17
|
+
roles?: string[] | undefined;
|
|
18
|
+
joinedAt?: string | undefined;
|
|
19
|
+
premiumSince?: string | null | undefined;
|
|
20
|
+
deaf?: boolean | undefined;
|
|
21
|
+
mute?: boolean | undefined;
|
|
22
|
+
flags?: import("discord-api-types/v10").GuildMemberFlags | undefined;
|
|
23
|
+
pending?: boolean | undefined;
|
|
24
|
+
communicationDisabledUntil?: string | null | undefined;
|
|
25
|
+
} | undefined;
|
|
14
26
|
sessionId: string;
|
|
15
27
|
deaf: boolean;
|
|
16
28
|
mute: boolean;
|
package/lib/langs/handler.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { LocaleString } from 'discord-api-types/v10';
|
|
2
2
|
import { BaseHandler } from '../common';
|
|
3
|
-
export interface LangsHandlerLike {
|
|
4
|
-
getKey: LangsHandler['getKey'];
|
|
5
|
-
load: LangsHandler['load'];
|
|
6
|
-
values: LangsHandler['values'];
|
|
7
|
-
aliases: LangsHandler['aliases'];
|
|
8
|
-
get: LangsHandler['get'];
|
|
9
|
-
defaultLang?: LangsHandler['defaultLang'];
|
|
10
|
-
}
|
|
11
3
|
export declare class LangsHandler extends BaseHandler {
|
|
12
4
|
values: Partial<Record<string, any>>;
|
|
13
5
|
protected filter: (path: string) => boolean;
|
|
@@ -19,4 +11,8 @@ export declare class LangsHandler extends BaseHandler {
|
|
|
19
11
|
get(locale?: string | undefined): import("..").DefaultLocale;
|
|
20
12
|
};
|
|
21
13
|
load(dir: string): Promise<void>;
|
|
14
|
+
setHandlers({ callback }: {
|
|
15
|
+
callback: LangsHandler['callback'];
|
|
16
|
+
}): void;
|
|
17
|
+
callback: (_locale: string, file: Record<string, any>) => Record<string, any> | false;
|
|
22
18
|
}
|
package/lib/langs/handler.js
CHANGED
|
@@ -34,9 +34,14 @@ class LangsHandler extends common_1.BaseHandler {
|
|
|
34
34
|
const files = await this.loadFilesK(await this.getFiles(dir));
|
|
35
35
|
for (const i of files) {
|
|
36
36
|
const locale = i.name.split('.').slice(0, -1).join('.');
|
|
37
|
-
this.
|
|
38
|
-
|
|
37
|
+
const result = this.callback(locale, i.file);
|
|
38
|
+
if (result)
|
|
39
|
+
this.values[locale] = result;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
42
|
+
setHandlers({ callback }) {
|
|
43
|
+
this.callback = callback;
|
|
44
|
+
}
|
|
45
|
+
callback = (_locale, file) => file;
|
|
41
46
|
}
|
|
42
47
|
exports.LangsHandler = LangsHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { APIAutoModerationRule, RESTPatchAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleJSONBody } from 'discord-api-types/v10';
|
|
2
2
|
import type { UsingClient } from '../commands';
|
|
3
|
-
import type
|
|
3
|
+
import { type MethodContext, type ObjectToLower } from '../common';
|
|
4
4
|
import { DiscordBase } from './extra/DiscordBase';
|
|
5
5
|
export interface AutoModerationRule extends ObjectToLower<APIAutoModerationRule> {
|
|
6
6
|
}
|
|
@@ -8,16 +8,16 @@ export declare class AutoModerationRule extends DiscordBase<APIAutoModerationRul
|
|
|
8
8
|
constructor(client: UsingClient, data: APIAutoModerationRule);
|
|
9
9
|
fetchCreator(force?: boolean): Promise<import("./GuildMember").GuildMember>;
|
|
10
10
|
guild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">>;
|
|
11
|
-
fetch(): Promise<
|
|
12
|
-
edit(body: ObjectToLower<RESTPatchAPIAutoModerationRuleJSONBody>, reason?: string): Promise<
|
|
11
|
+
fetch(): Promise<AutoModerationRule>;
|
|
12
|
+
edit(body: ObjectToLower<RESTPatchAPIAutoModerationRuleJSONBody>, reason?: string): Promise<AutoModerationRule>;
|
|
13
13
|
delete(reason?: string): Promise<never>;
|
|
14
14
|
static methods({ client, guildId }: MethodContext<{
|
|
15
15
|
guildId: string;
|
|
16
16
|
}>): {
|
|
17
|
-
list: () => Promise<
|
|
18
|
-
create: (body: RESTPostAPIAutoModerationRuleJSONBody) => Promise<
|
|
17
|
+
list: () => Promise<AutoModerationRule[]>;
|
|
18
|
+
create: (body: RESTPostAPIAutoModerationRuleJSONBody) => Promise<AutoModerationRule>;
|
|
19
19
|
delete: (ruleId: string, reason?: string) => Promise<never>;
|
|
20
|
-
fetch: (ruleId: string) => Promise<
|
|
21
|
-
edit: (ruleId: string, body: RESTPatchAPIAutoModerationRuleJSONBody, reason?: string) => Promise<
|
|
20
|
+
fetch: (ruleId: string) => Promise<AutoModerationRule>;
|
|
21
|
+
edit: (ruleId: string, body: RESTPatchAPIAutoModerationRuleJSONBody, reason?: string) => Promise<AutoModerationRule>;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AutoModerationRule = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
4
5
|
const DiscordBase_1 = require("./extra/DiscordBase");
|
|
5
6
|
class AutoModerationRule extends DiscordBase_1.DiscordBase {
|
|
6
7
|
constructor(client, data) {
|
|
@@ -27,7 +28,7 @@ class AutoModerationRule extends DiscordBase_1.DiscordBase {
|
|
|
27
28
|
create: (body) => client.guilds.moderation.create(guildId, body),
|
|
28
29
|
delete: (ruleId, reason) => client.guilds.moderation.delete(guildId, ruleId, reason),
|
|
29
30
|
fetch: (ruleId) => client.guilds.moderation.fetch(guildId, ruleId),
|
|
30
|
-
edit: (ruleId, body, reason) => client.guilds.moderation.edit(guildId, ruleId, body, reason),
|
|
31
|
+
edit: (ruleId, body, reason) => client.guilds.moderation.edit(guildId, ruleId, (0, common_1.toCamelCase)(body), reason),
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { APIGuild, GatewayGuildCreateDispatchData } from 'discord-api-types/v10';
|
|
2
2
|
import type { UsingClient } from '../commands';
|
|
3
3
|
import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util';
|
|
4
|
+
import { AutoModerationRule } from './AutoModerationRule';
|
|
4
5
|
import { GuildEmoji } from './GuildEmoji';
|
|
5
6
|
import { GuildMember } from './GuildMember';
|
|
6
7
|
import { GuildRole } from './GuildRole';
|
|
8
|
+
import { GuildTemplate } from './GuildTemplate';
|
|
7
9
|
import { Sticker } from './Sticker';
|
|
8
10
|
import { BaseGuild } from './extra/BaseGuild';
|
|
9
11
|
import type { DiscordBase } from './extra/DiscordBase';
|
|
@@ -23,12 +25,12 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
23
25
|
get maxEmojis(): MaxEmojis;
|
|
24
26
|
fetchOwner(force?: boolean): Promise<null> | Promise<GuildMember>;
|
|
25
27
|
templates: {
|
|
26
|
-
fetch: (code: string) => Promise<
|
|
27
|
-
list: () => Promise<
|
|
28
|
-
create: (body: import("discord-api-types/v10").RESTPostAPIGuildTemplatesJSONBody) => Promise<
|
|
29
|
-
sync: (code: string) => Promise<
|
|
30
|
-
edit: (code: string, body: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<import("discord-api-types/v10").RESTPostAPIGuildTemplatesJSONBody>>) => Promise<
|
|
31
|
-
delete: (code: string) => Promise<
|
|
28
|
+
fetch: (code: string) => Promise<GuildTemplate>;
|
|
29
|
+
list: () => Promise<GuildTemplate[]>;
|
|
30
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIGuildTemplatesJSONBody) => Promise<GuildTemplate>;
|
|
31
|
+
sync: (code: string) => Promise<GuildTemplate>;
|
|
32
|
+
edit: (code: string, body: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<import("discord-api-types/v10").RESTPostAPIGuildTemplatesJSONBody>>) => Promise<GuildTemplate>;
|
|
33
|
+
delete: (code: string) => Promise<GuildTemplate>;
|
|
32
34
|
};
|
|
33
35
|
stickers: {
|
|
34
36
|
list: () => Promise<Sticker[]>;
|
|
@@ -49,17 +51,17 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
49
51
|
list: (query?: import("discord-api-types/v10").RESTGetAPIGuildMembersQuery | undefined, force?: boolean) => Promise<GuildMember[]>;
|
|
50
52
|
};
|
|
51
53
|
moderationRules: {
|
|
52
|
-
list: () => Promise<
|
|
53
|
-
create: (body: import("discord-api-types/v10").RESTPostAPIAutoModerationRuleJSONBody) => Promise<
|
|
54
|
+
list: () => Promise<AutoModerationRule[]>;
|
|
55
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIAutoModerationRuleJSONBody) => Promise<AutoModerationRule>;
|
|
54
56
|
delete: (ruleId: string, reason?: string | undefined) => Promise<never>;
|
|
55
|
-
fetch: (ruleId: string) => Promise<
|
|
56
|
-
edit: (ruleId: string, body: import("discord-api-types/v10").RESTPatchAPIAutoModerationRuleJSONBody, reason?: string | undefined) => Promise<
|
|
57
|
+
fetch: (ruleId: string) => Promise<AutoModerationRule>;
|
|
58
|
+
edit: (ruleId: string, body: import("discord-api-types/v10").RESTPatchAPIAutoModerationRuleJSONBody, reason?: string | undefined) => Promise<AutoModerationRule>;
|
|
57
59
|
};
|
|
58
60
|
roles: {
|
|
59
|
-
create: (body: import("discord-api-types/v10").RESTPostAPIGuildRoleJSONBody) => Promise<
|
|
61
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIGuildRoleJSONBody) => Promise<GuildRole>;
|
|
60
62
|
list: (force?: boolean) => Promise<GuildRole[]>;
|
|
61
|
-
edit: (roleId: string, body: import("discord-api-types/v10").RESTPatchAPIGuildRoleJSONBody, reason?: string | undefined) => Promise<
|
|
62
|
-
delete: (roleId: string, reason?: string | undefined) => Promise<
|
|
63
|
+
edit: (roleId: string, body: import("discord-api-types/v10").RESTPatchAPIGuildRoleJSONBody, reason?: string | undefined) => Promise<GuildRole>;
|
|
64
|
+
delete: (roleId: string, reason?: string | undefined) => Promise<GuildRole>;
|
|
63
65
|
editPositions: (body: import("discord-api-types/v10").RESTPatchAPIGuildRolePositionsJSONBody) => Promise<GuildRole[]>;
|
|
64
66
|
};
|
|
65
67
|
channels: {
|
|
@@ -10,15 +10,15 @@ export declare class GuildRole extends DiscordBase {
|
|
|
10
10
|
permissions: PermissionsBitField;
|
|
11
11
|
constructor(client: UsingClient, data: APIRole, guildId: string);
|
|
12
12
|
guild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">> | undefined;
|
|
13
|
-
edit(body: RESTPatchAPIGuildRoleJSONBody, reason?: string): Promise<
|
|
14
|
-
delete(reason?: string): Promise<
|
|
13
|
+
edit(body: RESTPatchAPIGuildRoleJSONBody, reason?: string): Promise<GuildRole>;
|
|
14
|
+
delete(reason?: string): Promise<GuildRole>;
|
|
15
15
|
static methods(ctx: MethodContext<{
|
|
16
16
|
guildId: string;
|
|
17
17
|
}>): {
|
|
18
|
-
create: (body: RESTPostAPIGuildRoleJSONBody) => Promise<
|
|
18
|
+
create: (body: RESTPostAPIGuildRoleJSONBody) => Promise<GuildRole>;
|
|
19
19
|
list: (force?: boolean) => Promise<GuildRole[]>;
|
|
20
|
-
edit: (roleId: string, body: RESTPatchAPIGuildRoleJSONBody, reason?: string) => Promise<
|
|
21
|
-
delete: (roleId: string, reason?: string) => Promise<
|
|
20
|
+
edit: (roleId: string, body: RESTPatchAPIGuildRoleJSONBody, reason?: string) => Promise<GuildRole>;
|
|
21
|
+
delete: (roleId: string, reason?: string) => Promise<GuildRole>;
|
|
22
22
|
editPositions: (body: RESTPatchAPIGuildRolePositionsJSONBody) => Promise<GuildRole[]>;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -7,18 +7,18 @@ export interface GuildTemplate extends Base, ObjectToLower<APITemplate> {
|
|
|
7
7
|
export declare class GuildTemplate extends Base {
|
|
8
8
|
constructor(client: UsingClient, data: APITemplate);
|
|
9
9
|
guild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">>;
|
|
10
|
-
fetch(): Promise<
|
|
11
|
-
sync(): Promise<
|
|
12
|
-
edit(body: RESTPatchAPIGuildTemplateJSONBody): Promise<
|
|
13
|
-
delete(): Promise<
|
|
10
|
+
fetch(): Promise<GuildTemplate>;
|
|
11
|
+
sync(): Promise<GuildTemplate>;
|
|
12
|
+
edit(body: RESTPatchAPIGuildTemplateJSONBody): Promise<GuildTemplate>;
|
|
13
|
+
delete(): Promise<GuildTemplate>;
|
|
14
14
|
static methods(ctx: MethodContext<{
|
|
15
15
|
guildId: string;
|
|
16
16
|
}>): {
|
|
17
|
-
fetch: (code: string) => Promise<
|
|
18
|
-
list: () => Promise<
|
|
19
|
-
create: (body: RESTPostAPIGuildTemplatesJSONBody) => Promise<
|
|
20
|
-
sync: (code: string) => Promise<
|
|
21
|
-
edit: (code: string, body: RESTPatchAPIGuildTemplateJSONBody) => Promise<
|
|
22
|
-
delete: (code: string) => Promise<
|
|
17
|
+
fetch: (code: string) => Promise<GuildTemplate>;
|
|
18
|
+
list: () => Promise<GuildTemplate[]>;
|
|
19
|
+
create: (body: RESTPostAPIGuildTemplatesJSONBody) => Promise<GuildTemplate>;
|
|
20
|
+
sync: (code: string) => Promise<GuildTemplate>;
|
|
21
|
+
edit: (code: string, body: RESTPatchAPIGuildTemplateJSONBody) => Promise<GuildTemplate>;
|
|
22
|
+
delete: (code: string) => Promise<GuildTemplate>;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -32,7 +32,7 @@ export declare class BaseInteraction<FromGuild extends boolean = boolean, Type e
|
|
|
32
32
|
private matchReplied;
|
|
33
33
|
reply(body: ReplyInteractionBody): Promise<void>;
|
|
34
34
|
deferReply(flags?: MessageFlags): Promise<void>;
|
|
35
|
-
static from(client: UsingClient, gateway: GatewayInteractionCreateDispatchData, __reply?: __InternalReplyFunction): StringSelectMenuInteraction<string[]> | AutocompleteInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/v10").APIPingInteraction>;
|
|
35
|
+
static from(client: UsingClient, gateway: GatewayInteractionCreateDispatchData, __reply?: __InternalReplyFunction): RoleSelectMenuInteraction | UserSelectMenuInteraction | MentionableSelectMenuInteraction | ChannelSelectMenuInteraction | StringSelectMenuInteraction<string[]> | AutocompleteInteraction<boolean> | ChatInputCommandInteraction<boolean> | UserCommandInteraction<boolean> | MessageCommandInteraction<boolean> | ButtonInteraction | ModalSubmitInteraction<boolean> | BaseInteraction<boolean, import("discord-api-types/v10").APIPingInteraction>;
|
|
36
36
|
fetchGuild(force?: boolean): Promise<import("./Guild").Guild<"cached"> | import("./Guild").Guild<"api">> | undefined;
|
|
37
37
|
}
|
|
38
38
|
export type AllInteractions = AutocompleteInteraction | ChatInputCommandInteraction | UserCommandInteraction | MessageCommandInteraction | ComponentInteraction | SelectMenuInteraction | ModalSubmitInteraction | BaseInteraction;
|
|
@@ -55,11 +55,11 @@ export declare class Interaction<FromGuild extends boolean = boolean, Type exten
|
|
|
55
55
|
write<FR extends boolean = false>(body: InteractionCreateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessage, void>>;
|
|
56
56
|
modal(body: ModalCreateBodyRequest): Promise<void>;
|
|
57
57
|
editOrReply<FR extends boolean = false>(body: InteractionCreateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessage, void>>;
|
|
58
|
-
editMessage(messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<
|
|
59
|
-
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<
|
|
58
|
+
editMessage(messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessage>;
|
|
59
|
+
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessage>;
|
|
60
60
|
deleteResponse(): Promise<void | undefined>;
|
|
61
61
|
deleteMessage(messageId: string): Promise<void | undefined>;
|
|
62
|
-
|
|
62
|
+
followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessage>;
|
|
63
63
|
}
|
|
64
64
|
export declare class ApplicationCommandInteraction<FromGuild extends boolean = boolean, Type extends APIApplicationCommandInteraction = APIApplicationCommandInteraction> extends Interaction<FromGuild, Type> {
|
|
65
65
|
type: ApplicationCommandType;
|