oceanic.js 1.7.1-dev.bfbbbda → 1.7.1-dev.ceedfe2
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.js +18 -1
- package/dist/lib/Constants.d.ts +27 -8
- package/dist/lib/Constants.js +46 -26
- package/dist/lib/gateway/ShardManager.js +2 -1
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +7 -3
- package/dist/lib/rest/RequestHandler.js +2 -2
- package/dist/lib/routes/Channels.d.ts +4 -4
- package/dist/lib/routes/Channels.js +4 -4
- package/dist/lib/structures/AutocompleteInteraction.d.ts +3 -1
- package/dist/lib/structures/AutocompleteInteraction.js +4 -1
- package/dist/lib/structures/Channel.js +5 -1
- package/dist/lib/structures/ClientApplication.d.ts +1 -1
- package/dist/lib/structures/ClientApplication.js +2 -2
- package/dist/lib/structures/CommandInteraction.d.ts +3 -1
- package/dist/lib/structures/CommandInteraction.js +4 -1
- package/dist/lib/structures/ComponentInteraction.d.ts +3 -1
- package/dist/lib/structures/ComponentInteraction.js +4 -1
- package/dist/lib/structures/ForumChannel.d.ts +5 -94
- package/dist/lib/structures/ForumChannel.js +5 -223
- package/dist/lib/structures/MediaChannel.d.ts +11 -0
- package/dist/lib/structures/MediaChannel.js +19 -0
- package/dist/lib/structures/Member.d.ts +3 -3
- package/dist/lib/structures/Member.js +5 -5
- package/dist/lib/structures/Message.js +3 -2
- package/dist/lib/structures/ModalSubmitInteraction.d.ts +3 -1
- package/dist/lib/structures/ModalSubmitInteraction.js +4 -1
- package/dist/lib/structures/TextableChannel.d.ts +1 -1
- package/dist/lib/structures/TextableChannel.js +1 -1
- package/dist/lib/structures/TextableVoiceChannel.d.ts +1 -1
- package/dist/lib/structures/TextableVoiceChannel.js +2 -2
- package/dist/lib/structures/ThreadOnlyChannel.d.ts +98 -0
- package/dist/lib/structures/ThreadOnlyChannel.js +231 -0
- package/dist/lib/structures/User.d.ts +6 -3
- package/dist/lib/structures/User.js +20 -4
- package/dist/lib/types/channels.d.ts +22 -15
- package/dist/lib/types/events.d.ts +2 -2
- package/dist/lib/types/gateway.d.ts +6 -1
- package/dist/lib/types/interactions.d.ts +15 -39
- package/dist/lib/types/json.d.ts +24 -16
- package/dist/lib/types/users.d.ts +4 -3
- package/dist/package.json +9 -8
- package/esm.mjs +4 -0
- package/package.json +9 -8
package/dist/lib/types/json.d.ts
CHANGED
|
@@ -36,7 +36,8 @@ import type {
|
|
|
36
36
|
GuildChannels,
|
|
37
37
|
TextableGuildChannels,
|
|
38
38
|
ThreadChannels,
|
|
39
|
-
VoiceChannels
|
|
39
|
+
VoiceChannels,
|
|
40
|
+
ThreadOnlyChannels
|
|
40
41
|
} from "./channels";
|
|
41
42
|
import type { ScheduledEventEntityMetadata } from "./scheduled-events";
|
|
42
43
|
import type {
|
|
@@ -212,21 +213,8 @@ export interface JSONExtendedUser extends JSONUser {
|
|
|
212
213
|
mfaEnabled: boolean;
|
|
213
214
|
verified: boolean;
|
|
214
215
|
}
|
|
215
|
-
export interface JSONForumChannel extends
|
|
216
|
-
|
|
217
|
-
defaultAutoArchiveDuration: ThreadAutoArchiveDuration;
|
|
218
|
-
defaultForumLayout: ForumLayoutTypes;
|
|
219
|
-
defaultReactionEmoji: ForumEmoji | null;
|
|
220
|
-
defaultSortOrder: SortOrderTypes | null;
|
|
221
|
-
defaultThreadRateLimitPerUser: number;
|
|
222
|
-
flags: number;
|
|
223
|
-
lastThreadID: string | null;
|
|
224
|
-
permissionOverwrites: Array<JSONPermissionOverwrite>;
|
|
225
|
-
position: number;
|
|
226
|
-
rateLimitPerUser: number;
|
|
227
|
-
template: string;
|
|
228
|
-
threads: Array<string>;
|
|
229
|
-
topic: string | null;
|
|
216
|
+
export interface JSONForumChannel extends JSONThreadOnlyChannel {
|
|
217
|
+
type: ChannelTypes.GUILD_FORUM;
|
|
230
218
|
}
|
|
231
219
|
export interface JSONGroupChannel extends JSONChannel {
|
|
232
220
|
applicationID: string;
|
|
@@ -379,6 +367,9 @@ export interface JSONInviteGuild extends JSONBase {
|
|
|
379
367
|
vanityURLCode: string | null;
|
|
380
368
|
verificationLevel: VerificationLevels;
|
|
381
369
|
}
|
|
370
|
+
export interface JSONMediaChannel extends JSONThreadOnlyChannel {
|
|
371
|
+
type: ChannelTypes.GUILD_MEDIA;
|
|
372
|
+
}
|
|
382
373
|
export interface JSONMember extends JSONBase {
|
|
383
374
|
avatar: string | null;
|
|
384
375
|
communicationDisabledUntil: number | null;
|
|
@@ -599,6 +590,22 @@ export interface JSONThreadChannel extends JSONGuildChannel {
|
|
|
599
590
|
totalMessageSent: number;
|
|
600
591
|
type: ThreadChannels;
|
|
601
592
|
}
|
|
593
|
+
export interface JSONThreadOnlyChannel extends JSONGuildChannel {
|
|
594
|
+
availableTags: Array<ForumTag>;
|
|
595
|
+
defaultAutoArchiveDuration: ThreadAutoArchiveDuration;
|
|
596
|
+
defaultForumLayout: ForumLayoutTypes;
|
|
597
|
+
defaultReactionEmoji: ForumEmoji | null;
|
|
598
|
+
defaultSortOrder: SortOrderTypes | null;
|
|
599
|
+
defaultThreadRateLimitPerUser: number;
|
|
600
|
+
flags: number;
|
|
601
|
+
lastThreadID: string | null;
|
|
602
|
+
permissionOverwrites: Array<JSONPermissionOverwrite>;
|
|
603
|
+
position: number;
|
|
604
|
+
rateLimitPerUser: number;
|
|
605
|
+
threads: Array<string>;
|
|
606
|
+
topic: string | null;
|
|
607
|
+
type: ThreadOnlyChannels;
|
|
608
|
+
}
|
|
602
609
|
export interface JSONUnavailableGuild extends JSONBase {
|
|
603
610
|
unavailable: true;
|
|
604
611
|
}
|
|
@@ -608,6 +615,7 @@ export interface JSONUser extends JSONBase {
|
|
|
608
615
|
banner?: string | null;
|
|
609
616
|
bot: boolean;
|
|
610
617
|
discriminator: string;
|
|
618
|
+
globalName: string | null;
|
|
611
619
|
publicFlags: number;
|
|
612
620
|
system: boolean;
|
|
613
621
|
username: string;
|
|
@@ -12,6 +12,7 @@ export interface RESTUser {
|
|
|
12
12
|
discriminator: string;
|
|
13
13
|
email?: string | null;
|
|
14
14
|
flags?: number;
|
|
15
|
+
global_name: string | null;
|
|
15
16
|
id: string;
|
|
16
17
|
locale?: string;
|
|
17
18
|
member?: RawMember;
|
|
@@ -22,10 +23,10 @@ export interface RESTUser {
|
|
|
22
23
|
username: string;
|
|
23
24
|
verified?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export interface RawUser extends Pick<RESTUser, "id" | "username" | "discriminator" | "avatar" | "avatar_decoration" | "bot" | "system" | "banner" | "accent_color">, Required<Pick<RESTUser, "public_flags">> {}
|
|
26
|
+
export interface RawUser extends Pick<RESTUser, "id" | "username" | "discriminator" | "avatar" | "avatar_decoration" | "bot" | "system" | "banner" | "accent_color">, Required<Pick<RESTUser, "public_flags" | "global_name">> {}
|
|
26
27
|
export interface RawUserWithMember extends RawUser, Pick<RESTUser, "member"> {}
|
|
27
|
-
export interface RawOAuthUser extends Pick<RESTUser, "id" | "username" | "discriminator" | "avatar" | "avatar_decoration" | "bot" | "system">, Required<Pick<RESTUser, "banner" | "accent_color" | "locale" | "mfa_enabled" | "email" | "verified" | "flags" | "public_flags">> {}
|
|
28
|
-
export interface RawExtendedUser extends Pick<RawOAuthUser, "avatar" | "avatar_decoration" | "bot" | "discriminator" | "email" | "flags" | "id" | "mfa_enabled" | "username" | "verified"> {}
|
|
28
|
+
export interface RawOAuthUser extends Pick<RESTUser, "id" | "username" | "discriminator" | "avatar" | "avatar_decoration" | "bot" | "system" | "global_name">, Required<Pick<RESTUser, "banner" | "accent_color" | "locale" | "mfa_enabled" | "email" | "verified" | "flags" | "public_flags">> {}
|
|
29
|
+
export interface RawExtendedUser extends Pick<RawOAuthUser, "avatar" | "avatar_decoration" | "bot" | "discriminator" | "email" | "flags" | "id" | "mfa_enabled" | "username" | "verified" | "global_name"> {}
|
|
29
30
|
|
|
30
31
|
export interface EditSelfUserOptions {
|
|
31
32
|
/** The new avatar (buffer, or full data url). `null` to reset. */
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oceanic.js",
|
|
3
|
-
"version": "1.7.1-dev.
|
|
3
|
+
"version": "1.7.1-dev.ceedfe2",
|
|
4
4
|
"description": "A NodeJS library for interfacing with Discord.",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"typedoc": "^0.23.28",
|
|
27
27
|
"typedoc-plugin-extras": "2.3.2",
|
|
28
28
|
"typedoc-plugin-rename-defaults": "^0.6.5",
|
|
29
|
+
"typedoc-plugin-mdn-links": "^3.0.3",
|
|
29
30
|
"rimraf": "^5.0.1"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
@@ -49,15 +50,15 @@
|
|
|
49
50
|
"homepage": "https://github.com/OceanicJS/Oceanic#readme",
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@favware/npm-deprecate": "^1.0.7",
|
|
52
|
-
"@types/node": "^20.2.
|
|
53
|
+
"@types/node": "^20.2.6",
|
|
53
54
|
"@types/pako": "^2.0.0",
|
|
54
|
-
"@types/ws": "^8.5.
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
56
|
-
"@typescript-eslint/parser": "^5.59.
|
|
57
|
-
"eslint": "^8.
|
|
55
|
+
"@types/ws": "^8.5.5",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
57
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
58
|
+
"eslint": "^8.42.0",
|
|
58
59
|
"eslint-plugin-import": "^2.27.5",
|
|
59
60
|
"eslint-plugin-import-newlines": "^1.3.1",
|
|
60
|
-
"eslint-plugin-jsdoc": "^
|
|
61
|
+
"eslint-plugin-jsdoc": "^46.2.6",
|
|
61
62
|
"eslint-plugin-json": "^3.1.0",
|
|
62
63
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
63
64
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"typescript": "<5.5 >=5.x"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
|
-
"tslib": "^2.5.
|
|
70
|
+
"tslib": "^2.5.3",
|
|
70
71
|
"undici": "^5.22.1",
|
|
71
72
|
"ws": "^8.13.0"
|
|
72
73
|
},
|
package/esm.mjs
CHANGED
|
@@ -34,6 +34,7 @@ const InteractionResolvedChannel = (await import("./dist/lib/structures/Interact
|
|
|
34
34
|
const InteractionOptionsWrapper = (await import("./dist/lib/util/InteractionOptionsWrapper.js")).default.default;
|
|
35
35
|
const Invite = (await import("./dist/lib/structures/Invite.js")).default.default;
|
|
36
36
|
const InviteGuild = (await import("./dist/lib/structures/InviteGuild.js")).default.default;
|
|
37
|
+
const MediaChannel = (await import("./dist/lib/structures/MediaChannel.js")).default.default;
|
|
37
38
|
const Member = (await import("./dist/lib/structures/Member.js")).default.default;
|
|
38
39
|
const Message = (await import("./dist/lib/structures/Message.js")).default.default;
|
|
39
40
|
const ModalSubmitInteraction = (await import("./dist/lib/structures/ModalSubmitInteraction.js")).default.default;
|
|
@@ -61,6 +62,7 @@ const TextableChannel = (await import("./dist/lib/structures/TextableChannel.js"
|
|
|
61
62
|
const TextableVoiceChannel = (await import("./dist/lib/structures/TextableVoiceChannel.js")).default.default;
|
|
62
63
|
const ThreadableChannel = (await import("./dist/lib/structures/ThreadableChannel.js")).default.default;
|
|
63
64
|
const ThreadChannel = (await import("./dist/lib/structures/ThreadChannel.js")).default.default;
|
|
65
|
+
const ThreadOnlyChannel = (await import("./dist/lib/structures/ThreadOnlyChannel.js")).default.default;
|
|
64
66
|
const TextChannel = (await import("./dist/lib/structures/TextChannel.js")).default.default;
|
|
65
67
|
const TypedCollection = (await import("./dist/lib/util/TypedCollection.js")).default.default;
|
|
66
68
|
const TypedEmitter = (await import("./dist/lib/util/TypedEmitter.js")).default.default;
|
|
@@ -110,6 +112,7 @@ export {
|
|
|
110
112
|
InteractionOptionsWrapper,
|
|
111
113
|
Invite,
|
|
112
114
|
InviteGuild,
|
|
115
|
+
MediaChannel,
|
|
113
116
|
Member,
|
|
114
117
|
Message,
|
|
115
118
|
ModalSubmitInteraction,
|
|
@@ -138,6 +141,7 @@ export {
|
|
|
138
141
|
TextChannel,
|
|
139
142
|
ThreadableChannel,
|
|
140
143
|
ThreadChannel,
|
|
144
|
+
ThreadOnlyChannel,
|
|
141
145
|
TypedCollection,
|
|
142
146
|
TypedEmitter,
|
|
143
147
|
UnavailableGuild,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oceanic.js",
|
|
3
|
-
"version": "1.7.1-dev.
|
|
3
|
+
"version": "1.7.1-dev.ceedfe2",
|
|
4
4
|
"description": "A NodeJS library for interfacing with Discord.",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"typedoc": "^0.23.28",
|
|
27
27
|
"typedoc-plugin-extras": "2.3.2",
|
|
28
28
|
"typedoc-plugin-rename-defaults": "^0.6.5",
|
|
29
|
+
"typedoc-plugin-mdn-links": "^3.0.3",
|
|
29
30
|
"rimraf": "^5.0.1"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
@@ -49,15 +50,15 @@
|
|
|
49
50
|
"homepage": "https://github.com/OceanicJS/Oceanic#readme",
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@favware/npm-deprecate": "^1.0.7",
|
|
52
|
-
"@types/node": "^20.2.
|
|
53
|
+
"@types/node": "^20.2.6",
|
|
53
54
|
"@types/pako": "^2.0.0",
|
|
54
|
-
"@types/ws": "^8.5.
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
56
|
-
"@typescript-eslint/parser": "^5.59.
|
|
57
|
-
"eslint": "^8.
|
|
55
|
+
"@types/ws": "^8.5.5",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
57
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
58
|
+
"eslint": "^8.42.0",
|
|
58
59
|
"eslint-plugin-import": "^2.27.5",
|
|
59
60
|
"eslint-plugin-import-newlines": "^1.3.1",
|
|
60
|
-
"eslint-plugin-jsdoc": "^
|
|
61
|
+
"eslint-plugin-jsdoc": "^46.2.6",
|
|
61
62
|
"eslint-plugin-json": "^3.1.0",
|
|
62
63
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
63
64
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"typescript": "<5.5 >=5.x"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
|
-
"tslib": "^2.5.
|
|
70
|
+
"tslib": "^2.5.3",
|
|
70
71
|
"undici": "^5.22.1",
|
|
71
72
|
"ws": "^8.13.0"
|
|
72
73
|
},
|