oceanic.js 1.11.3-dev.fb35174 → 1.12.1-dev.02ecdc3
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/README.md +0 -1
- package/dist/lib/Client.d.ts +3 -3
- package/dist/lib/Client.js +11 -13
- package/dist/lib/Constants.d.ts +68 -11
- package/dist/lib/Constants.js +79 -8
- package/dist/lib/gateway/Shard.d.ts +4 -1
- package/dist/lib/gateway/Shard.js +28 -8
- package/dist/lib/gateway/ShardManager.js +3 -3
- package/dist/lib/gateway/compression/zlib-sync.js +2 -2
- package/dist/lib/gateway/compression/zstd.d.ts +1 -5
- package/dist/lib/gateway/compression/zstd.js +5 -18
- package/dist/lib/gateway/events.d.ts +5 -0
- package/dist/lib/gateway/events.js +49 -6
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +4 -2
- package/dist/lib/rest/RequestHandler.js +2 -2
- package/dist/lib/routes/Applications.d.ts +20 -1
- package/dist/lib/routes/Applications.js +101 -45
- package/dist/lib/routes/Channels.d.ts +9 -1
- package/dist/lib/routes/Channels.js +89 -126
- package/dist/lib/routes/Guilds.d.ts +46 -32
- package/dist/lib/routes/Guilds.js +211 -265
- package/dist/lib/routes/Interactions.d.ts +5 -3
- package/dist/lib/routes/Interactions.js +32 -11
- package/dist/lib/routes/Miscellaneous.d.ts +6 -0
- package/dist/lib/routes/Miscellaneous.js +12 -1
- package/dist/lib/routes/OAuth.js +11 -14
- package/dist/lib/routes/Users.js +10 -4
- package/dist/lib/routes/Webhooks.js +47 -55
- package/dist/lib/structures/Application.d.ts +7 -1
- package/dist/lib/structures/Application.js +10 -1
- package/dist/lib/structures/ApplicationCommand.d.ts +3 -1
- package/dist/lib/structures/ApplicationCommand.js +5 -1
- package/dist/lib/structures/Attachment.d.ts +8 -0
- package/dist/lib/structures/Attachment.js +11 -1
- package/dist/lib/structures/AutocompleteInteraction.d.ts +4 -2
- package/dist/lib/structures/AutocompleteInteraction.js +6 -2
- package/dist/lib/structures/Base.js +5 -4
- package/dist/lib/structures/ClientApplication.d.ts +6 -1
- package/dist/lib/structures/ClientApplication.js +8 -1
- package/dist/lib/structures/CommandInteraction.d.ts +17 -12
- package/dist/lib/structures/CommandInteraction.js +30 -23
- package/dist/lib/structures/ComponentInteraction.d.ts +17 -14
- package/dist/lib/structures/ComponentInteraction.js +28 -25
- package/dist/lib/structures/Entitlement.d.ts +2 -2
- package/dist/lib/structures/Entitlement.js +5 -5
- package/dist/lib/structures/Guild.d.ts +33 -12
- package/dist/lib/structures/Guild.js +49 -21
- package/dist/lib/structures/GuildTemplate.d.ts +1 -6
- package/dist/lib/structures/GuildTemplate.js +1 -8
- package/dist/lib/structures/Invite.d.ts +3 -1
- package/dist/lib/structures/Invite.js +4 -1
- package/dist/lib/structures/Message.d.ts +3 -3
- package/dist/lib/structures/Message.js +25 -16
- package/dist/lib/structures/ModalSubmitInteraction.d.ts +16 -13
- package/dist/lib/structures/ModalSubmitInteraction.js +26 -18
- package/dist/lib/structures/PingInteraction.d.ts +2 -2
- package/dist/lib/structures/PingInteraction.js +2 -2
- package/dist/lib/structures/Role.d.ts +7 -2
- package/dist/lib/structures/Role.js +20 -2
- package/dist/lib/structures/Soundboard.d.ts +42 -0
- package/dist/lib/structures/Soundboard.js +73 -0
- package/dist/lib/structures/Subscription.d.ts +25 -0
- package/dist/lib/structures/Subscription.js +38 -0
- package/dist/lib/structures/User.d.ts +3 -6
- package/dist/lib/structures/User.js +15 -7
- package/dist/lib/types/applications.d.ts +89 -8
- package/dist/lib/types/channels.d.ts +354 -189
- package/dist/lib/types/client.d.ts +7 -2
- package/dist/lib/types/events.d.ts +15 -3
- package/dist/lib/types/gateway-raw.d.ts +39 -3
- package/dist/lib/types/gateway.d.ts +10 -2
- package/dist/lib/types/guild-template.d.ts +0 -7
- package/dist/lib/types/guilds.d.ts +46 -34
- package/dist/lib/types/interactions.d.ts +65 -7
- package/dist/lib/types/json.d.ts +33 -8
- package/dist/lib/types/users.d.ts +26 -1
- package/dist/lib/types/webhooks.d.ts +6 -2
- package/dist/lib/util/Errors.d.ts +9 -0
- package/dist/lib/util/Errors.js +22 -2
- package/dist/lib/util/QueryBuilder.d.ts +5 -0
- package/dist/lib/util/QueryBuilder.js +21 -0
- package/dist/lib/util/Routes.d.ts +7 -4
- package/dist/lib/util/Routes.js +18 -11
- package/dist/lib/util/Util.d.ts +11 -6
- package/dist/lib/util/Util.js +118 -13
- package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +5 -2
- package/dist/lib/util/interactions/MessageInteractionResponse.js +9 -7
- package/dist/package.json +8 -9
- package/esm.mjs +2 -0
- package/package.json +8 -9
@@ -1,14 +1,14 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
3
|
/** @module REST/Guilds */
|
4
|
-
import type { CreateGuildEmojiOptions,
|
4
|
+
import type { CreateGuildEmojiOptions, EditGuildEmojiOptions, EditGuildOptions, GuildEmoji, ModifyChannelPositionsEntry, GetActiveThreadsResponse, GetMembersOptions, SearchMembersOptions, AddMemberOptions, EditMemberOptions, EditCurrentMemberOptions, GetBansOptions, Ban, CreateBanOptions, CreateRoleOptions, EditRolePositionsEntry, EditRoleOptions, GetPruneCountOptions, BeginPruneOptions, WidgetSettings, RawWidget, Widget, WidgetImageStyle, WelcomeScreen, EditWelcomeScreenOptions, GetVanityURLResponse, EditUserVoiceStateOptions, EditCurrentUserVoiceStateOptions, CreateChannelOptions, Sticker, CreateStickerOptions, EditStickerOptions, Onboarding, EditOnboardingOptions, EditIncidentActionsOptions, IncidentActions, BulkBanOptions, BulkBanResponse, MemberSearchOptions, MemberSearchResults, EditSoundboardSoundOptions, CreateSoundboardSoundOptions } from "../types/guilds";
|
5
5
|
import type { CreateAutoModerationRuleOptions, EditAutoModerationRuleOptions } from "../types/auto-moderation";
|
6
|
-
import type { ChannelTypeMap
|
6
|
+
import type { ChannelTypeMap } from "../Constants";
|
7
7
|
import type { AuditLog, GetAuditLogOptions } from "../types/audit-log";
|
8
8
|
import GuildScheduledEvent from "../structures/GuildScheduledEvent";
|
9
9
|
import type { CreateScheduledEventOptions, EditScheduledEventOptions, GetScheduledEventUsersOptions, ScheduledEventUser } from "../types/scheduled-events";
|
10
10
|
import GuildTemplate from "../structures/GuildTemplate";
|
11
|
-
import type {
|
11
|
+
import type { CreateTemplateOptions, EditGuildTemplateOptions } from "../types/guild-template";
|
12
12
|
import GuildPreview from "../structures/GuildPreview";
|
13
13
|
import type { AnyGuildChannelWithoutThreads, AnyInviteChannel, GuildChannelsWithoutThreads, PartialInviteChannel } from "../types/channels";
|
14
14
|
import Role from "../structures/Role";
|
@@ -21,6 +21,7 @@ import Guild from "../structures/Guild";
|
|
21
21
|
import type Member from "../structures/Member";
|
22
22
|
import type { Uncached } from "../types/shared";
|
23
23
|
import VoiceState from "../structures/VoiceState";
|
24
|
+
import Soundboard from "../structures/Soundboard";
|
24
25
|
/** Various methods for interacting with guilds. Located at {@link Client#rest | Client#rest}{@link RESTManager#guilds | .guilds}. */
|
25
26
|
export default class Guilds {
|
26
27
|
private _manager;
|
@@ -60,12 +61,6 @@ export default class Guilds {
|
|
60
61
|
* @param options The options for banning.
|
61
62
|
*/
|
62
63
|
bulkBan(guildID: string, options: BulkBanOptions): Promise<BulkBanResponse>;
|
63
|
-
/**
|
64
|
-
* Create a guild. This can only be used by bots in under 10 guilds.
|
65
|
-
* @param options The options for creating the guild.
|
66
|
-
* @caching This method **does not** cache its result.
|
67
|
-
*/
|
68
|
-
create(options: CreateGuildOptions): Promise<Guild>;
|
69
64
|
/**
|
70
65
|
* Create an auto moderation rule for a guild.
|
71
66
|
* @param guildID The ID of the guild.
|
@@ -98,15 +93,6 @@ export default class Guilds {
|
|
98
93
|
* @caches {@link Guild#emojis | Guild#emojis}<br>{@link Client#users | Client#users} (creator, if applicable)
|
99
94
|
*/
|
100
95
|
createEmoji(guildID: string, options: CreateGuildEmojiOptions): Promise<GuildEmoji>;
|
101
|
-
/**
|
102
|
-
* Create a guild from a template. This can only be used by bots in less than 10 guilds.
|
103
|
-
*
|
104
|
-
* Note: This does NOT add the guild to the client's cache.
|
105
|
-
* @param code The code of the template to use.
|
106
|
-
* @param options The options for creating the guild.
|
107
|
-
* @caching This method **does not** cache its result.
|
108
|
-
*/
|
109
|
-
createFromTemplate(code: string, options: CreateGuildFromTemplateOptions): Promise<Guild>;
|
110
96
|
/**
|
111
97
|
* Create a role.
|
112
98
|
* @param guildID The ID of the guild.
|
@@ -123,6 +109,14 @@ export default class Guilds {
|
|
123
109
|
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
124
110
|
*/
|
125
111
|
createScheduledEvent(guildID: string, options: CreateScheduledEventOptions): Promise<GuildScheduledEvent>;
|
112
|
+
/**
|
113
|
+
* Create a soundboard sound
|
114
|
+
* @param guildID The ID of the guild
|
115
|
+
* @param options The options for creating the soundboard sound
|
116
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
117
|
+
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
|
118
|
+
*/
|
119
|
+
createSoundboardSound(guildID: string, options: CreateSoundboardSoundOptions): Promise<Soundboard>;
|
126
120
|
/**
|
127
121
|
* Create a sticker.
|
128
122
|
* @param guildID The ID of the guild.
|
@@ -137,12 +131,6 @@ export default class Guilds {
|
|
137
131
|
* @param options The options for creating the template.
|
138
132
|
*/
|
139
133
|
createTemplate(guildID: string, options: CreateTemplateOptions): Promise<GuildTemplate>;
|
140
|
-
/**
|
141
|
-
* Delete a guild.
|
142
|
-
* @param guildID The ID of the guild.
|
143
|
-
* @caching This method **does not** cache its result.
|
144
|
-
*/
|
145
|
-
delete(guildID: string): Promise<void>;
|
146
134
|
/**
|
147
135
|
* Delete an auto moderation rule.
|
148
136
|
* @param guildID The ID of the guild.
|
@@ -183,6 +171,14 @@ export default class Guilds {
|
|
183
171
|
* @caching This method **does not** cache its result.
|
184
172
|
*/
|
185
173
|
deleteScheduledEvent(guildID: string, eventID: string, reason?: string): Promise<void>;
|
174
|
+
/**
|
175
|
+
*
|
176
|
+
* @param guildID The ID of the guild.
|
177
|
+
* @param soundID The ID of the soundboard sound to delete.
|
178
|
+
* @param reason The reason for deleting the soundboard sound.
|
179
|
+
* @caching This method **does not** cache its result.
|
180
|
+
*/
|
181
|
+
deleteSoundboardSound(guildID: string, soundID: string, reason?: string): Promise<void>;
|
186
182
|
/**
|
187
183
|
* Delete a sticker.
|
188
184
|
* @param guildID The ID of the guild.
|
@@ -252,13 +248,6 @@ export default class Guilds {
|
|
252
248
|
* @caching This method **does not** cache its result.
|
253
249
|
*/
|
254
250
|
editIncidentActions(guildID: string, options: EditIncidentActionsOptions): Promise<IncidentActions>;
|
255
|
-
/**
|
256
|
-
* Edit the [mfa level](https://discord.com/developers/docs/resources/guild#guild-object-mfa-level) of a guild. This can only be used by the guild owner.
|
257
|
-
* @param guildID The ID of the guild.
|
258
|
-
* @param options The options for editing the MFA level.
|
259
|
-
* @caching This method **does not** cache its result.
|
260
|
-
*/
|
261
|
-
editMFALevel(guildID: string, options: EditMFALevelOptions): Promise<MFALevels>;
|
262
251
|
/**
|
263
252
|
* Edit a guild member. Use editCurrentMember if you wish to update the nick of this client using the `CHANGE_NICKNAME` permission.
|
264
253
|
* @param guildID The ID of the guild.
|
@@ -294,11 +283,21 @@ export default class Guilds {
|
|
294
283
|
/**
|
295
284
|
* Edit an existing scheduled event in a guild.
|
296
285
|
* @param guildID The ID of the guild.
|
286
|
+
* @param scheduledEventID The ID of the scheduled event.
|
297
287
|
* @param options The options for editing the scheduled event.
|
298
288
|
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
299
289
|
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
300
290
|
*/
|
301
|
-
editScheduledEvent(guildID: string, options: EditScheduledEventOptions): Promise<GuildScheduledEvent>;
|
291
|
+
editScheduledEvent(guildID: string, scheduledEventID: string, options: EditScheduledEventOptions): Promise<GuildScheduledEvent>;
|
292
|
+
/**
|
293
|
+
* Edit a soundboard sound.
|
294
|
+
* @param guildID The ID of the guild.
|
295
|
+
* @param soundID The ID of the soundboard sound to edit.
|
296
|
+
* @param options The options for editing the soundboard sound.
|
297
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
298
|
+
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
|
299
|
+
*/
|
300
|
+
editSoundboardSound(guildID: string, soundID: string, options: EditSoundboardSoundOptions): Promise<Soundboard>;
|
302
301
|
/**
|
303
302
|
* Edit a sticker.
|
304
303
|
* @param guildID The ID of the guild.
|
@@ -503,6 +502,21 @@ export default class Guilds {
|
|
503
502
|
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
504
503
|
*/
|
505
504
|
getScheduledEvents(guildID: string, withUserCount?: number): Promise<Array<GuildScheduledEvent>>;
|
505
|
+
/**
|
506
|
+
* Get a soundboard sound.
|
507
|
+
* @param guildID The ID of the guild.
|
508
|
+
* @param soundID The ID of the soundboard sound to get.
|
509
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
510
|
+
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
|
511
|
+
*/
|
512
|
+
getSoundboardSound(guildID: string, soundID: string): Promise<Soundboard>;
|
513
|
+
/**
|
514
|
+
* Get a guild's soundboard sounds.
|
515
|
+
* @param guildID The ID of the guild.
|
516
|
+
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
517
|
+
* @caches {@link Guild#soundboardSounds | Guild#soundboardSounds}
|
518
|
+
*/
|
519
|
+
getSoundboardSounds(guildID: string): Promise<Array<Soundboard>>;
|
506
520
|
/**
|
507
521
|
* Get a sticker. Response will include a user if the client has the `MANAGE_EMOJIS_AND_STICKERS` permissions.
|
508
522
|
* @param guildID The ID of the guild.
|