oceanic.js 1.12.1-dev.8cc216d → 1.12.1-dev.9521b15
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/lib/Client.d.ts +3 -3
- package/dist/lib/Client.js +11 -14
- package/dist/lib/Constants.d.ts +5 -4
- package/dist/lib/Constants.js +4 -1
- package/dist/lib/gateway/Shard.js +2 -2
- package/dist/lib/gateway/ShardManager.js +2 -2
- package/dist/lib/gateway/events.js +7 -6
- package/dist/lib/routes/Applications.js +48 -54
- package/dist/lib/routes/Channels.js +71 -125
- package/dist/lib/routes/Guilds.d.ts +5 -32
- package/dist/lib/routes/Guilds.js +128 -271
- package/dist/lib/routes/Interactions.js +5 -8
- package/dist/lib/routes/OAuth.js +11 -14
- package/dist/lib/routes/Users.js +10 -4
- package/dist/lib/routes/Webhooks.js +37 -57
- package/dist/lib/structures/Guild.d.ts +3 -11
- package/dist/lib/structures/Guild.js +9 -21
- package/dist/lib/structures/GuildTemplate.d.ts +1 -6
- package/dist/lib/structures/GuildTemplate.js +1 -8
- package/dist/lib/structures/Role.d.ts +7 -2
- package/dist/lib/structures/Role.js +20 -2
- package/dist/lib/structures/User.d.ts +3 -1
- package/dist/lib/structures/User.js +15 -1
- package/dist/lib/types/channels.d.ts +34 -8
- package/dist/lib/types/guild-template.d.ts +0 -7
- package/dist/lib/types/guilds.d.ts +21 -37
- package/dist/lib/types/interactions.d.ts +35 -5
- package/dist/lib/types/json.d.ts +6 -2
- package/dist/lib/types/users.d.ts +26 -1
- package/dist/lib/types/webhooks.d.ts +1 -1
- package/dist/lib/util/Errors.d.ts +5 -0
- package/dist/lib/util/Errors.js +15 -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 +0 -2
- package/dist/lib/util/Routes.js +4 -7
- package/dist/lib/util/Util.d.ts +7 -5
- package/dist/lib/util/Util.js +57 -6
- package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +3 -3
- package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +2 -2
- package/dist/package.json +8 -8
- package/package.json +8 -8
@@ -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";
|
@@ -61,12 +61,6 @@ export default class Guilds {
|
|
61
61
|
* @param options The options for banning.
|
62
62
|
*/
|
63
63
|
bulkBan(guildID: string, options: BulkBanOptions): Promise<BulkBanResponse>;
|
64
|
-
/**
|
65
|
-
* Create a guild. This can only be used by bots in under 10 guilds.
|
66
|
-
* @param options The options for creating the guild.
|
67
|
-
* @caching This method **does not** cache its result.
|
68
|
-
*/
|
69
|
-
create(options: CreateGuildOptions): Promise<Guild>;
|
70
64
|
/**
|
71
65
|
* Create an auto moderation rule for a guild.
|
72
66
|
* @param guildID The ID of the guild.
|
@@ -99,15 +93,6 @@ export default class Guilds {
|
|
99
93
|
* @caches {@link Guild#emojis | Guild#emojis}<br>{@link Client#users | Client#users} (creator, if applicable)
|
100
94
|
*/
|
101
95
|
createEmoji(guildID: string, options: CreateGuildEmojiOptions): Promise<GuildEmoji>;
|
102
|
-
/**
|
103
|
-
* Create a guild from a template. This can only be used by bots in less than 10 guilds.
|
104
|
-
*
|
105
|
-
* Note: This does NOT add the guild to the client's cache.
|
106
|
-
* @param code The code of the template to use.
|
107
|
-
* @param options The options for creating the guild.
|
108
|
-
* @caching This method **does not** cache its result.
|
109
|
-
*/
|
110
|
-
createFromTemplate(code: string, options: CreateGuildFromTemplateOptions): Promise<Guild>;
|
111
96
|
/**
|
112
97
|
* Create a role.
|
113
98
|
* @param guildID The ID of the guild.
|
@@ -146,12 +131,6 @@ export default class Guilds {
|
|
146
131
|
* @param options The options for creating the template.
|
147
132
|
*/
|
148
133
|
createTemplate(guildID: string, options: CreateTemplateOptions): Promise<GuildTemplate>;
|
149
|
-
/**
|
150
|
-
* Delete a guild.
|
151
|
-
* @param guildID The ID of the guild.
|
152
|
-
* @caching This method **does not** cache its result.
|
153
|
-
*/
|
154
|
-
delete(guildID: string): Promise<void>;
|
155
134
|
/**
|
156
135
|
* Delete an auto moderation rule.
|
157
136
|
* @param guildID The ID of the guild.
|
@@ -269,13 +248,6 @@ export default class Guilds {
|
|
269
248
|
* @caching This method **does not** cache its result.
|
270
249
|
*/
|
271
250
|
editIncidentActions(guildID: string, options: EditIncidentActionsOptions): Promise<IncidentActions>;
|
272
|
-
/**
|
273
|
-
* 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.
|
274
|
-
* @param guildID The ID of the guild.
|
275
|
-
* @param options The options for editing the MFA level.
|
276
|
-
* @caching This method **does not** cache its result.
|
277
|
-
*/
|
278
|
-
editMFALevel(guildID: string, options: EditMFALevelOptions): Promise<MFALevels>;
|
279
251
|
/**
|
280
252
|
* Edit a guild member. Use editCurrentMember if you wish to update the nick of this client using the `CHANGE_NICKNAME` permission.
|
281
253
|
* @param guildID The ID of the guild.
|
@@ -311,11 +283,12 @@ export default class Guilds {
|
|
311
283
|
/**
|
312
284
|
* Edit an existing scheduled event in a guild.
|
313
285
|
* @param guildID The ID of the guild.
|
286
|
+
* @param scheduledEventID The ID of the scheduled event.
|
314
287
|
* @param options The options for editing the scheduled event.
|
315
288
|
* @caching This method **may** cache its result. The result will not be cached if the guild is not cached.
|
316
289
|
* @caches {@link Guild#scheduledEvents | Guild#scheduledEvents}
|
317
290
|
*/
|
318
|
-
editScheduledEvent(guildID: string, options: EditScheduledEventOptions): Promise<GuildScheduledEvent>;
|
291
|
+
editScheduledEvent(guildID: string, scheduledEventID: string, options: EditScheduledEventOptions): Promise<GuildScheduledEvent>;
|
319
292
|
/**
|
320
293
|
* Edit a soundboard sound.
|
321
294
|
* @param guildID The ID of the guild.
|