disgroove 2.2.7-dev.fca4921 → 3.0.0-dev.2cf2b90
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/LICENSE +9 -9
- package/README.md +48 -48
- package/dist/lib/Client.d.ts +332 -301
- package/dist/lib/Client.js +562 -462
- package/dist/lib/constants.d.ts +35 -24
- package/dist/lib/constants.js +39 -27
- package/dist/lib/gateway/Dispatcher.d.ts +104 -0
- package/dist/lib/gateway/Dispatcher.js +471 -0
- package/dist/lib/gateway/Shard.d.ts +12 -21
- package/dist/lib/gateway/Shard.js +121 -570
- package/dist/lib/gateway/Transmitter.d.ts +22 -0
- package/dist/lib/gateway/Transmitter.js +93 -0
- package/dist/lib/gateway/WebSocketManager.d.ts +22 -0
- package/dist/lib/gateway/WebSocketManager.js +93 -0
- package/dist/lib/index.d.ts +5 -1
- package/dist/lib/index.js +5 -1
- package/dist/lib/rest/Endpoints.d.ts +95 -91
- package/dist/lib/rest/Endpoints.js +111 -102
- package/dist/lib/rest/RequestManager.d.ts +1 -3
- package/dist/lib/rest/RequestManager.js +17 -7
- package/dist/lib/rest/index.js +17 -7
- package/dist/lib/transformers/ApplicationCommands.js +4 -4
- package/dist/lib/transformers/Applications.d.ts +2 -0
- package/dist/lib/transformers/Applications.js +110 -4
- package/dist/lib/transformers/AuditLogs.js +10 -10
- package/dist/lib/transformers/AutoModeration.js +6 -6
- package/dist/lib/transformers/Channels.js +16 -16
- package/dist/lib/transformers/Components.d.ts +15 -3
- package/dist/lib/transformers/Components.js +309 -156
- package/dist/lib/transformers/Entitlements.d.ts +2 -2
- package/dist/lib/transformers/Entitlements.js +16 -16
- package/dist/lib/transformers/GuildScheduledEvents.js +8 -8
- package/dist/lib/transformers/GuildTemplates.js +4 -4
- package/dist/lib/transformers/Guilds.js +28 -28
- package/dist/lib/transformers/Interactions.js +330 -55
- package/dist/lib/transformers/Lobbies.d.ts +7 -0
- package/dist/lib/transformers/Lobbies.js +38 -0
- package/dist/lib/transformers/Messages.d.ts +4 -3
- package/dist/lib/transformers/Messages.js +38 -52
- package/dist/lib/transformers/Polls.js +2 -2
- package/dist/lib/transformers/Presences.d.ts +3 -3
- package/dist/lib/transformers/Presences.js +6 -6
- package/dist/lib/transformers/Roles.js +8 -8
- package/dist/lib/transformers/SKUs.js +2 -2
- package/dist/lib/transformers/Soundboards.js +6 -6
- package/dist/lib/transformers/StageInstances.js +6 -6
- package/dist/lib/transformers/Stickers.js +3 -3
- package/dist/lib/transformers/Subscriptions.js +8 -8
- package/dist/lib/transformers/Teams.js +4 -4
- package/dist/lib/transformers/Users.js +6 -6
- package/dist/lib/transformers/Voice.js +8 -8
- package/dist/lib/transformers/Webhooks.js +6 -6
- package/dist/lib/transformers/index.d.ts +2 -1
- package/dist/lib/transformers/index.js +2 -1
- package/dist/lib/types/application-command.d.ts +9 -4
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -0
- package/dist/lib/types/application.d.ts +12 -7
- package/dist/lib/types/audit-log.d.ts +9 -5
- package/dist/lib/types/auto-moderation.d.ts +7 -3
- package/dist/lib/types/channel.d.ts +17 -23
- package/dist/lib/types/common.d.ts +2 -0
- package/dist/lib/types/components.d.ts +510 -0
- package/dist/lib/types/emoji.d.ts +1 -0
- package/dist/lib/types/entitlements.d.ts +5 -4
- package/dist/lib/types/gateway-events.d.ts +406 -207
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -5
- package/dist/lib/types/guild-template.d.ts +3 -2
- package/dist/lib/types/guild.d.ts +40 -22
- package/dist/lib/types/interaction.d.ts +35 -18
- package/dist/lib/types/invite.d.ts +5 -2
- package/dist/lib/types/lobby.d.ts +31 -0
- package/dist/lib/types/lobby.js +2 -0
- package/dist/lib/types/message.d.ts +32 -20
- package/dist/lib/types/poll.d.ts +7 -1
- package/dist/lib/types/role.d.ts +8 -5
- package/dist/lib/types/sku.d.ts +2 -1
- package/dist/lib/types/soundboard.d.ts +4 -3
- package/dist/lib/types/stage-instance.d.ts +4 -3
- package/dist/lib/types/sticker.d.ts +8 -5
- package/dist/lib/types/subscription.d.ts +6 -5
- package/dist/lib/types/team.d.ts +4 -2
- package/dist/lib/types/user.d.ts +10 -3
- package/dist/lib/types/voice.d.ts +6 -4
- package/dist/lib/types/webhook.d.ts +4 -3
- package/dist/lib/utils/CDN.d.ts +22 -22
- package/dist/lib/utils/CDN.js +22 -22
- package/dist/lib/utils/errors.d.ts +3 -1
- package/dist/lib/utils/errors.js +4 -0
- package/dist/lib/utils/formatters.d.ts +7 -7
- package/dist/lib/utils/formatters.js +28 -29
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +18 -7
- package/dist/lib/utils/permissions.d.ts +2 -0
- package/dist/lib/utils/permissions.js +7 -0
- package/dist/package.json +4 -4
- package/package.json +5 -5
- package/dist/lib/types/message-components.d.ts +0 -234
- /package/dist/lib/types/{message-components.js → components.js} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import WebSocket from "ws";
|
|
2
|
+
import { GatewayOPCodes } from "../constants";
|
|
3
|
+
import type { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
|
4
|
+
export declare class Transmitter {
|
|
5
|
+
private ws;
|
|
6
|
+
constructor(ws: WebSocket | null);
|
|
7
|
+
send(op: GatewayOPCodes, data: unknown): void;
|
|
8
|
+
/** https://discord.com/developers/docs/topics/gateway-events#heartbeat */
|
|
9
|
+
heartbeat(lastSequence: number | null): void;
|
|
10
|
+
/** https://discord.com/developers/docs/topics/gateway-events#identify */
|
|
11
|
+
identify(options: Identify): void;
|
|
12
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
|
|
13
|
+
requestGuildMembers(options: RequestGuildMembers): void;
|
|
14
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
|
15
|
+
requestSoundboardSounds(options: RequestSoundboardSounds): void;
|
|
16
|
+
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
17
|
+
resume(options: Resume): void;
|
|
18
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
19
|
+
updatePresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
20
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
|
|
21
|
+
updateVoiceState(options: GatewayVoiceStateUpdate): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Transmitter = void 0;
|
|
7
|
+
const ws_1 = __importDefault(require("ws"));
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
class Transmitter {
|
|
10
|
+
ws;
|
|
11
|
+
constructor(ws) {
|
|
12
|
+
this.ws = ws;
|
|
13
|
+
}
|
|
14
|
+
send(op, data) {
|
|
15
|
+
if (this.ws && this.ws.readyState === ws_1.default.OPEN) {
|
|
16
|
+
this.ws.send(JSON.stringify({
|
|
17
|
+
op,
|
|
18
|
+
d: data,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** https://discord.com/developers/docs/topics/gateway-events#heartbeat */
|
|
23
|
+
heartbeat(lastSequence) {
|
|
24
|
+
this.send(constants_1.GatewayOPCodes.Heartbeat, lastSequence);
|
|
25
|
+
}
|
|
26
|
+
/** https://discord.com/developers/docs/topics/gateway-events#identify */
|
|
27
|
+
identify(options) {
|
|
28
|
+
this.send(constants_1.GatewayOPCodes.Identify, {
|
|
29
|
+
token: options.token,
|
|
30
|
+
properties: {
|
|
31
|
+
os: options.properties.os,
|
|
32
|
+
browser: options.properties.browser,
|
|
33
|
+
device: options.properties.device,
|
|
34
|
+
},
|
|
35
|
+
compress: options.compress,
|
|
36
|
+
large_threshold: options.largeThreshold,
|
|
37
|
+
shard: options.shard,
|
|
38
|
+
presence: options.presence,
|
|
39
|
+
intents: options.intents,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
|
|
43
|
+
requestGuildMembers(options) {
|
|
44
|
+
this.send(constants_1.GatewayOPCodes.RequestGuildMembers, {
|
|
45
|
+
guild_id: options.guildId,
|
|
46
|
+
query: options.query,
|
|
47
|
+
limit: options.limit,
|
|
48
|
+
presences: options.presences,
|
|
49
|
+
user_ids: options.userIds,
|
|
50
|
+
nonce: options.nonce,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
|
54
|
+
requestSoundboardSounds(options) {
|
|
55
|
+
this.send(constants_1.GatewayOPCodes.RequestSoundboardSounds, {
|
|
56
|
+
guild_ids: options.guildIds,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
60
|
+
resume(options) {
|
|
61
|
+
this.send(constants_1.GatewayOPCodes.Resume, {
|
|
62
|
+
token: options.token,
|
|
63
|
+
session_id: options.sessionId,
|
|
64
|
+
seq: options.seq,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
68
|
+
updatePresence(options) {
|
|
69
|
+
this.send(constants_1.GatewayOPCodes.PresenceUpdate, {
|
|
70
|
+
since: options.status === constants_1.StatusTypes.Idle ? Date.now() : null,
|
|
71
|
+
activities: options.activities?.map((activity) => ({
|
|
72
|
+
name: activity.type === constants_1.ActivityType.Custom
|
|
73
|
+
? "Custom Status"
|
|
74
|
+
: activity.name,
|
|
75
|
+
type: activity.type,
|
|
76
|
+
url: activity.url,
|
|
77
|
+
state: activity.state,
|
|
78
|
+
})),
|
|
79
|
+
status: options.status ?? constants_1.StatusTypes.Online,
|
|
80
|
+
afk: !!options.afk,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
|
|
84
|
+
updateVoiceState(options) {
|
|
85
|
+
this.send(constants_1.GatewayOPCodes.VoiceStateUpdate, {
|
|
86
|
+
guild_id: options.guildId,
|
|
87
|
+
channel_id: options.channelId,
|
|
88
|
+
self_mute: options.selfMute,
|
|
89
|
+
self_deaf: options.selfDeaf,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Transmitter = Transmitter;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import WebSocket from "ws";
|
|
2
|
+
import { GatewayOPCodes } from "../constants";
|
|
3
|
+
import { GatewayPresenceUpdate, GatewayVoiceStateUpdate, Identify, RequestGuildMembers, RequestSoundboardSounds, Resume } from "../types/gateway-events";
|
|
4
|
+
export declare class WebSocketManager {
|
|
5
|
+
private ws;
|
|
6
|
+
constructor(ws: WebSocket | null);
|
|
7
|
+
send(op: GatewayOPCodes, data: unknown): void;
|
|
8
|
+
/** https://discord.com/developers/docs/topics/gateway-events#heartbeat */
|
|
9
|
+
heartbeat(lastSequence: number | null): void;
|
|
10
|
+
/** https://discord.com/developers/docs/topics/gateway-events#identify */
|
|
11
|
+
identify(options: Identify): void;
|
|
12
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
|
|
13
|
+
requestGuildMembers(options: RequestGuildMembers): void;
|
|
14
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
|
15
|
+
requestSoundboardSounds(options: RequestSoundboardSounds): void;
|
|
16
|
+
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
17
|
+
resume(options: Resume): void;
|
|
18
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
19
|
+
updatePresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
20
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
|
|
21
|
+
updateVoiceState(options: GatewayVoiceStateUpdate): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WebSocketManager = void 0;
|
|
7
|
+
const ws_1 = __importDefault(require("ws"));
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
class WebSocketManager {
|
|
10
|
+
ws;
|
|
11
|
+
constructor(ws) {
|
|
12
|
+
this.ws = ws;
|
|
13
|
+
}
|
|
14
|
+
send(op, data) {
|
|
15
|
+
if (this.ws && this.ws.readyState === ws_1.default.OPEN) {
|
|
16
|
+
this.ws.send(JSON.stringify({
|
|
17
|
+
op,
|
|
18
|
+
d: data,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** https://discord.com/developers/docs/topics/gateway-events#heartbeat */
|
|
23
|
+
heartbeat(lastSequence) {
|
|
24
|
+
this.send(constants_1.GatewayOPCodes.Heartbeat, lastSequence);
|
|
25
|
+
}
|
|
26
|
+
/** https://discord.com/developers/docs/topics/gateway-events#identify */
|
|
27
|
+
identify(options) {
|
|
28
|
+
this.send(constants_1.GatewayOPCodes.Identify, {
|
|
29
|
+
token: options.token,
|
|
30
|
+
properties: {
|
|
31
|
+
os: options.properties.os,
|
|
32
|
+
browser: options.properties.browser,
|
|
33
|
+
device: options.properties.device,
|
|
34
|
+
},
|
|
35
|
+
compress: options.compress,
|
|
36
|
+
large_threshold: options.largeThreshold,
|
|
37
|
+
shard: options.shard,
|
|
38
|
+
presence: options.presence,
|
|
39
|
+
intents: options.intents,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-guild-members */
|
|
43
|
+
requestGuildMembers(options) {
|
|
44
|
+
this.send(constants_1.GatewayOPCodes.RequestGuildMembers, {
|
|
45
|
+
guild_id: options.guildId,
|
|
46
|
+
query: options.query,
|
|
47
|
+
limit: options.limit,
|
|
48
|
+
presences: options.presences,
|
|
49
|
+
user_ids: options.userIds,
|
|
50
|
+
nonce: options.nonce,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** https://discord.com/developers/docs/topics/gateway-events#request-soundboard-sounds */
|
|
54
|
+
requestSoundboardSounds(options) {
|
|
55
|
+
this.send(constants_1.GatewayOPCodes.RequestSoundboardSounds, {
|
|
56
|
+
guild_ids: options.guildIds,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** https://discord.com/developers/docs/topics/gateway-events#resume */
|
|
60
|
+
resume(options) {
|
|
61
|
+
this.send(constants_1.GatewayOPCodes.Resume, {
|
|
62
|
+
token: options.token,
|
|
63
|
+
session_id: options.sessionId,
|
|
64
|
+
seq: options.seq,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
68
|
+
updatePresence(options) {
|
|
69
|
+
this.send(constants_1.GatewayOPCodes.PresenceUpdate, {
|
|
70
|
+
since: options.status === constants_1.StatusTypes.Idle ? Date.now() : null,
|
|
71
|
+
activities: options.activities?.map((activity) => ({
|
|
72
|
+
name: activity.type === constants_1.ActivityType.Custom
|
|
73
|
+
? "Custom Status"
|
|
74
|
+
: activity.name,
|
|
75
|
+
type: activity.type,
|
|
76
|
+
url: activity.url,
|
|
77
|
+
state: activity.state,
|
|
78
|
+
})),
|
|
79
|
+
status: options.status ?? constants_1.StatusTypes.Online,
|
|
80
|
+
afk: !!options.afk,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
|
|
84
|
+
updateVoiceState(options) {
|
|
85
|
+
this.send(constants_1.GatewayOPCodes.VoiceStateUpdate, {
|
|
86
|
+
guild_id: options.guildId,
|
|
87
|
+
channel_id: options.channelId,
|
|
88
|
+
self_mute: options.selfMute,
|
|
89
|
+
self_deaf: options.selfDeaf,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.WebSocketManager = WebSocketManager;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./types/audit-log";
|
|
|
8
8
|
export * from "./types/auto-moderation";
|
|
9
9
|
export * from "./types/channel";
|
|
10
10
|
export * from "./types/common";
|
|
11
|
+
export * from "./types/components";
|
|
11
12
|
export * from "./types/emoji";
|
|
12
13
|
export * from "./types/entitlements";
|
|
13
14
|
export * from "./types/gateway-events";
|
|
@@ -16,12 +17,15 @@ export * from "./types/guild-template";
|
|
|
16
17
|
export * from "./types/guild";
|
|
17
18
|
export * from "./types/interaction";
|
|
18
19
|
export * from "./types/invite";
|
|
19
|
-
export * from "./types/
|
|
20
|
+
export * from "./types/lobby";
|
|
21
|
+
export * from "./types/message";
|
|
20
22
|
export * from "./types/poll";
|
|
21
23
|
export * from "./types/role";
|
|
22
24
|
export * from "./types/sku";
|
|
25
|
+
export * from "./types/soundboard";
|
|
23
26
|
export * from "./types/stage-instance";
|
|
24
27
|
export * from "./types/sticker";
|
|
28
|
+
export * from "./types/subscription";
|
|
25
29
|
export * from "./types/team";
|
|
26
30
|
export * from "./types/user";
|
|
27
31
|
export * from "./types/voice";
|
package/dist/lib/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./types/audit-log"), exports);
|
|
|
24
24
|
__exportStar(require("./types/auto-moderation"), exports);
|
|
25
25
|
__exportStar(require("./types/channel"), exports);
|
|
26
26
|
__exportStar(require("./types/common"), exports);
|
|
27
|
+
__exportStar(require("./types/components"), exports);
|
|
27
28
|
__exportStar(require("./types/emoji"), exports);
|
|
28
29
|
__exportStar(require("./types/entitlements"), exports);
|
|
29
30
|
__exportStar(require("./types/gateway-events"), exports);
|
|
@@ -32,12 +33,15 @@ __exportStar(require("./types/guild-template"), exports);
|
|
|
32
33
|
__exportStar(require("./types/guild"), exports);
|
|
33
34
|
__exportStar(require("./types/interaction"), exports);
|
|
34
35
|
__exportStar(require("./types/invite"), exports);
|
|
35
|
-
__exportStar(require("./types/
|
|
36
|
+
__exportStar(require("./types/lobby"), exports);
|
|
37
|
+
__exportStar(require("./types/message"), exports);
|
|
36
38
|
__exportStar(require("./types/poll"), exports);
|
|
37
39
|
__exportStar(require("./types/role"), exports);
|
|
38
40
|
__exportStar(require("./types/sku"), exports);
|
|
41
|
+
__exportStar(require("./types/soundboard"), exports);
|
|
39
42
|
__exportStar(require("./types/stage-instance"), exports);
|
|
40
43
|
__exportStar(require("./types/sticker"), exports);
|
|
44
|
+
__exportStar(require("./types/subscription"), exports);
|
|
41
45
|
__exportStar(require("./types/team"), exports);
|
|
42
46
|
__exportStar(require("./types/user"), exports);
|
|
43
47
|
__exportStar(require("./types/voice"), exports);
|
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import type { snowflake } from "../types/common";
|
|
2
|
-
export declare const guild: (
|
|
2
|
+
export declare const guild: (guildId: snowflake) => `guilds/${string}`;
|
|
3
3
|
export declare const guilds: () => "guilds";
|
|
4
|
-
export declare const guildActiveThreads: (
|
|
5
|
-
export declare const guildAuditLog: (
|
|
6
|
-
export declare const guildAutoModerationRule: (
|
|
7
|
-
export declare const guildAutoModerationRules: (
|
|
8
|
-
export declare const guildBan: (
|
|
9
|
-
export declare const guildBans: (
|
|
10
|
-
export declare const guildBulkBan: (
|
|
11
|
-
export declare const guildChannels: (
|
|
12
|
-
export declare const guildMemberNickname: (
|
|
13
|
-
export declare const guildEmoji: (
|
|
14
|
-
export declare const guildEmojis: (
|
|
15
|
-
export declare const guildIncidentsActions: (
|
|
16
|
-
export declare const guildIntegration: (
|
|
17
|
-
export declare const guildIntegrations: (
|
|
18
|
-
export declare const guildInvites: (
|
|
19
|
-
export declare const guildMFA: (
|
|
20
|
-
export declare const guildMember: (
|
|
21
|
-
export declare const guildMemberRole: (
|
|
22
|
-
export declare const guildMembers: (
|
|
23
|
-
export declare const guildMembersSearch: (
|
|
24
|
-
export declare const guildMemberVerification: (
|
|
25
|
-
export declare const guildOnboarding: (
|
|
26
|
-
export declare const guildPreview: (
|
|
27
|
-
export declare const guildPrune: (
|
|
28
|
-
export declare const guildRole: (
|
|
29
|
-
export declare const guildRoles: (
|
|
30
|
-
export declare const guildScheduledEvent: (
|
|
31
|
-
export declare const guildScheduledEvents: (
|
|
32
|
-
export declare const guildScheduledEventUsers: (
|
|
33
|
-
export declare const guildSoundboardSound: (
|
|
34
|
-
export declare const guildSoundboardSounds: (
|
|
35
|
-
export declare const guildSticker: (
|
|
36
|
-
export declare const guildStickers: (
|
|
37
|
-
export declare const guildTemplate: (
|
|
38
|
-
export declare const guildTemplates: (
|
|
39
|
-
export declare const guildVanityURL: (
|
|
40
|
-
export declare const guildVoiceRegions: (
|
|
41
|
-
export declare const guildVoiceState: (
|
|
42
|
-
export declare const guildWebhooks: (
|
|
43
|
-
export declare const guildWelcomeScreen: (
|
|
44
|
-
export declare const guildWidgetImage: (
|
|
45
|
-
export declare const guildWidgetJSON: (
|
|
46
|
-
export declare const guildWidgetSettings: (
|
|
4
|
+
export declare const guildActiveThreads: (guildId: snowflake) => `guilds/${string}/threads/active`;
|
|
5
|
+
export declare const guildAuditLog: (guildId: snowflake) => `guilds/${string}/audit-logs`;
|
|
6
|
+
export declare const guildAutoModerationRule: (guildId: snowflake, ruleId: snowflake) => `guilds/${string}/auto-moderation/rules/${string}`;
|
|
7
|
+
export declare const guildAutoModerationRules: (guildId: snowflake) => `guilds/${string}/auto-moderation/rules`;
|
|
8
|
+
export declare const guildBan: (guildId: snowflake, userId: snowflake) => `guilds/${string}/bans/${string}`;
|
|
9
|
+
export declare const guildBans: (guildId: snowflake) => `guilds/${string}/bans`;
|
|
10
|
+
export declare const guildBulkBan: (guildId: snowflake) => `guilds/${string}/bulk-ban`;
|
|
11
|
+
export declare const guildChannels: (guildId: snowflake) => `guilds/${string}/channels`;
|
|
12
|
+
export declare const guildMemberNickname: (guildId: snowflake) => `guilds/${string}/members/@me/nick`;
|
|
13
|
+
export declare const guildEmoji: (guildId: snowflake, emojiId: snowflake) => `guilds/${string}/emojis/${string}`;
|
|
14
|
+
export declare const guildEmojis: (guildId: snowflake) => `guilds/${string}/emojis`;
|
|
15
|
+
export declare const guildIncidentsActions: (guildId: snowflake) => `guilds/${string}/incidents-actions`;
|
|
16
|
+
export declare const guildIntegration: (guildId: snowflake, integrationId: snowflake) => `guilds/${string}/integrations/${string}`;
|
|
17
|
+
export declare const guildIntegrations: (guildId: snowflake) => `guilds/${string}/integrations`;
|
|
18
|
+
export declare const guildInvites: (guildId: snowflake) => `guilds/${string}/invites`;
|
|
19
|
+
export declare const guildMFA: (guildId: snowflake) => `guilds/${string}/mfa`;
|
|
20
|
+
export declare const guildMember: (guildId: snowflake, userId?: snowflake | "@me") => `guilds/${string}/members/${string}`;
|
|
21
|
+
export declare const guildMemberRole: (guildId: snowflake, memberId: snowflake, roleId: snowflake) => `guilds/${string}/members/${string}/roles/${string}`;
|
|
22
|
+
export declare const guildMembers: (guildId: snowflake) => `guilds/${string}/members`;
|
|
23
|
+
export declare const guildMembersSearch: (guildId: snowflake) => `guilds/${string}/members/search`;
|
|
24
|
+
export declare const guildMemberVerification: (guildId: snowflake) => `guilds/${string}/member-verification`;
|
|
25
|
+
export declare const guildOnboarding: (guildId: snowflake) => `guilds/${string}/onboarding`;
|
|
26
|
+
export declare const guildPreview: (guildId: snowflake) => `guilds/${string}/preview`;
|
|
27
|
+
export declare const guildPrune: (guildId: snowflake) => `guilds/${string}/prune`;
|
|
28
|
+
export declare const guildRole: (guildId: snowflake, roleId: snowflake) => `guilds/${string}/roles/${string}`;
|
|
29
|
+
export declare const guildRoles: (guildId: snowflake) => `guilds/${string}/roles`;
|
|
30
|
+
export declare const guildScheduledEvent: (guildId: snowflake, guildScheduledEventId: snowflake) => `guilds/${string}/scheduled-events/${string}`;
|
|
31
|
+
export declare const guildScheduledEvents: (guildId: snowflake) => `guilds/${string}/scheduled-events`;
|
|
32
|
+
export declare const guildScheduledEventUsers: (guildId: snowflake, guildScheduledEventId: snowflake) => `guilds/${string}/scheduled-events/${string}/users`;
|
|
33
|
+
export declare const guildSoundboardSound: (guildId: snowflake, soundId: snowflake) => `guilds/${string}/soundboard-sounds/${string}`;
|
|
34
|
+
export declare const guildSoundboardSounds: (guildId: snowflake) => `guilds/${string}/soundboard-sounds`;
|
|
35
|
+
export declare const guildSticker: (guildId: snowflake, stickerId: snowflake) => `guilds/${string}/stickers/${string}`;
|
|
36
|
+
export declare const guildStickers: (guildId: snowflake) => `guilds/${string}/stickers`;
|
|
37
|
+
export declare const guildTemplate: (guildId: snowflake, code: string) => `guilds/${string}/templates/${string}`;
|
|
38
|
+
export declare const guildTemplates: (guildId: snowflake) => `guilds/${string}/templates`;
|
|
39
|
+
export declare const guildVanityURL: (guildId: snowflake) => `guilds/${string}/vanity-url`;
|
|
40
|
+
export declare const guildVoiceRegions: (guildId: snowflake) => `guilds/${string}/regions`;
|
|
41
|
+
export declare const guildVoiceState: (guildId: snowflake, userId?: snowflake | "@me") => `guilds/${string}/voice-states/${string}`;
|
|
42
|
+
export declare const guildWebhooks: (guildId: snowflake) => `guilds/${string}/webhooks`;
|
|
43
|
+
export declare const guildWelcomeScreen: (guildId: snowflake) => `guilds/${string}/welcome-screen`;
|
|
44
|
+
export declare const guildWidgetImage: (guildId: snowflake) => `guilds/${string}/widget.png`;
|
|
45
|
+
export declare const guildWidgetJSON: (guildId: snowflake) => `guilds/${string}/widget.json`;
|
|
46
|
+
export declare const guildWidgetSettings: (guildId: snowflake) => `guilds/${string}/widget`;
|
|
47
47
|
export declare const template: (code: string) => `guilds/templates/${string}`;
|
|
48
|
-
export declare const channel: (
|
|
49
|
-
export declare const channelBulkDelete: (
|
|
50
|
-
export declare const channelFollowers: (
|
|
51
|
-
export declare const channelInvites: (
|
|
52
|
-
export declare const channelMessage: (
|
|
53
|
-
export declare const channelMessageAllReactions: (
|
|
54
|
-
export declare const channelMessageCrosspost: (
|
|
55
|
-
export declare const channelMessageReaction: (
|
|
56
|
-
export declare const channelMessages: (
|
|
57
|
-
export declare const channelPermission: (
|
|
58
|
-
export declare const channelPin: (
|
|
59
|
-
export declare const channelPins: (
|
|
60
|
-
export declare const channelRecipient: (
|
|
61
|
-
export declare const channelThreads: (
|
|
62
|
-
export declare const channelTyping: (
|
|
63
|
-
export declare const channelWebhooks: (
|
|
64
|
-
export declare const threads: (
|
|
65
|
-
export declare const threadMembers: (
|
|
66
|
-
export declare const pollAnswerVoters: (
|
|
67
|
-
export declare const pollExpire: (
|
|
68
|
-
export declare const user: (
|
|
69
|
-
export declare const userApplicationRoleConnection: (
|
|
48
|
+
export declare const channel: (channelId: snowflake) => `channels/${string}`;
|
|
49
|
+
export declare const channelBulkDelete: (channelId: snowflake) => `channels/${string}/messages/bulk-delete`;
|
|
50
|
+
export declare const channelFollowers: (channelId: snowflake) => `channels/${string}/followers`;
|
|
51
|
+
export declare const channelInvites: (channelId: snowflake) => `channels/${string}/invites`;
|
|
52
|
+
export declare const channelMessage: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/${string}`;
|
|
53
|
+
export declare const channelMessageAllReactions: (channelId: snowflake, messageId: snowflake, emoji?: string) => `channels/${string}/messages/${string}/reactions/${string}` | `channels/${string}/messages/${string}/reactions`;
|
|
54
|
+
export declare const channelMessageCrosspost: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/${string}/crosspost`;
|
|
55
|
+
export declare const channelMessageReaction: (channelId: snowflake, messageId: snowflake, emoji: string, userId?: snowflake | "@me") => `channels/${string}/messages/${string}/reactions/${string}/${string}`;
|
|
56
|
+
export declare const channelMessages: (channelId: snowflake) => `channels/${string}/messages`;
|
|
57
|
+
export declare const channelPermission: (channelId: snowflake, overwriteId: snowflake) => `channels/${string}/permissions/${string}`;
|
|
58
|
+
export declare const channelPin: (channelId: snowflake, messageId: snowflake) => `channels/${string}/messages/pins/${string}`;
|
|
59
|
+
export declare const channelPins: (channelId: snowflake) => `channels/${string}/messages/pins`;
|
|
60
|
+
export declare const channelRecipient: (channelId: snowflake, userId: snowflake) => `channels/${string}/recipients/${string}`;
|
|
61
|
+
export declare const channelThreads: (channelId: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/private` | `channels/${string}/threads/archived/public`;
|
|
62
|
+
export declare const channelTyping: (channelId: snowflake) => `channels/${string}/typing`;
|
|
63
|
+
export declare const channelWebhooks: (channelId: snowflake) => `channels/${string}/webhooks`;
|
|
64
|
+
export declare const threads: (channelId: snowflake, messageId?: snowflake) => `channels/${string}/threads`;
|
|
65
|
+
export declare const threadMembers: (threadId: snowflake, userId?: snowflake | "@me") => `channels/${string}/thread-members` | `channels/${string}/thread-members/${string}`;
|
|
66
|
+
export declare const pollAnswerVoters: (channelId: snowflake, messageId: snowflake, answerId: snowflake) => `channels/${string}/polls/${string}/answers/${string}`;
|
|
67
|
+
export declare const pollExpire: (channelId: snowflake, messageId: snowflake) => `channels/${string}/polls/${string}/expire`;
|
|
68
|
+
export declare const user: (userId?: snowflake | "@me") => `users/${string}`;
|
|
69
|
+
export declare const userApplicationRoleConnection: (applicationId: snowflake) => `users/@me/applications/${string}/role-connection`;
|
|
70
70
|
export declare const userChannels: () => "users/@me/channels";
|
|
71
71
|
export declare const userConnections: () => "users/@me/connections";
|
|
72
|
-
export declare const userGuild: (
|
|
72
|
+
export declare const userGuild: (guildId: snowflake) => `users/@me/guilds/${string}`;
|
|
73
73
|
export declare const userGuilds: () => "users/@me/guilds";
|
|
74
|
-
export declare const applicationActivityInstance: (
|
|
75
|
-
export declare const applicationCommand: (
|
|
76
|
-
export declare const applicationCommands: (
|
|
77
|
-
export declare const applicationCommandPermissions: (
|
|
74
|
+
export declare const applicationActivityInstance: (applicationId: snowflake, instanceId: string) => string;
|
|
75
|
+
export declare const applicationCommand: (applicationId: snowflake, commandId: snowflake) => `applications/${string}/commands/${string}`;
|
|
76
|
+
export declare const applicationCommands: (applicationId: snowflake) => `applications/${string}/commands`;
|
|
77
|
+
export declare const applicationCommandPermissions: (applicationId: snowflake, guildId: snowflake, commandId: snowflake) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
|
|
78
78
|
export declare const applicationUser: () => "applications/@me";
|
|
79
|
-
export declare const applicationEmoji: (
|
|
80
|
-
export declare const applicationEmojis: (
|
|
81
|
-
export declare const applicationEntitlement: (
|
|
82
|
-
export declare const applicationEntitlementConsume: (
|
|
83
|
-
export declare const applicationEntitlements: (
|
|
84
|
-
export declare const applicationGuildCommand: (
|
|
85
|
-
export declare const applicationGuildCommands: (
|
|
86
|
-
export declare const applicationRoleConnectionMetadata: (
|
|
87
|
-
export declare const applicationSKUs: (
|
|
88
|
-
export declare const guildApplicationCommandsPermissions: (
|
|
89
|
-
export declare const webhook: (
|
|
90
|
-
export declare const webhookMessage: (
|
|
91
|
-
export declare const webhookPlatform: (
|
|
92
|
-
export declare const stickerPack: (
|
|
79
|
+
export declare const applicationEmoji: (applicationId: snowflake, emojiId: snowflake) => `applications/${string}/emojis/${string}`;
|
|
80
|
+
export declare const applicationEmojis: (applicationId: snowflake) => `applications/${string}/emojis`;
|
|
81
|
+
export declare const applicationEntitlement: (applicationId: snowflake, entitlementId: snowflake) => `applications/${string}/entitlements/${string}`;
|
|
82
|
+
export declare const applicationEntitlementConsume: (applicationId: snowflake, entitlementId: snowflake) => `applications/${string}/entitlements/${string}/consume`;
|
|
83
|
+
export declare const applicationEntitlements: (applicationId: snowflake) => `applications/${string}/entitlements`;
|
|
84
|
+
export declare const applicationGuildCommand: (applicationId: snowflake, guildId: snowflake, commandId: snowflake) => `applications/${string}/guilds/${string}/commands/${string}`;
|
|
85
|
+
export declare const applicationGuildCommands: (applicationId: snowflake, guildId: snowflake) => `applications/${string}/guilds/${string}/commands`;
|
|
86
|
+
export declare const applicationRoleConnectionMetadata: (applicationId: snowflake) => `applications/${string}/role-connections/metadata`;
|
|
87
|
+
export declare const applicationSKUs: (applicationId: snowflake) => `applications/${string}/skus`;
|
|
88
|
+
export declare const guildApplicationCommandsPermissions: (applicationId: snowflake, guildId: snowflake) => `applications/${string}/guilds/${string}/commands/permissions`;
|
|
89
|
+
export declare const webhook: (webhookId: snowflake, webhookToken?: string) => `webhooks/${string}`;
|
|
90
|
+
export declare const webhookMessage: (webhookId: snowflake, webhookToken: string, messageId?: snowflake | "@original") => `webhooks/${string}/${string}/messages/${string}`;
|
|
91
|
+
export declare const webhookPlatform: (webhookId: snowflake, webhookToken: string, platform: "github" | "slack") => `webhooks/${string}/${string}/github` | `webhooks/${string}/${string}/slack`;
|
|
92
|
+
export declare const stickerPack: (packId: snowflake) => `sticker-packs/${string}`;
|
|
93
93
|
export declare const stickerPacks: () => "sticker-packs";
|
|
94
|
-
export declare const skuSubscription: (
|
|
95
|
-
export declare const skuSubscriptions: (
|
|
96
|
-
export declare const sendSoundboardSound: (
|
|
94
|
+
export declare const skuSubscription: (skuId: snowflake, subscriptionId: snowflake) => `skus/${string}/subscriptions/${string}`;
|
|
95
|
+
export declare const skuSubscriptions: (skuId: snowflake) => `skus/${string}/subscriptions`;
|
|
96
|
+
export declare const sendSoundboardSound: (channelId: snowflake) => `channels/${string}/send-soundboard-sound`;
|
|
97
97
|
export declare const soundboardDefaultSounds: () => "soundboard-default-sounds";
|
|
98
98
|
export declare const gateway: () => "gateway";
|
|
99
99
|
export declare const gatewayBot: () => "gateway/bot";
|
|
@@ -102,9 +102,13 @@ export declare const oauth2Application: () => "oauth2/applications/@me";
|
|
|
102
102
|
export declare const oauth2Authorization: () => "oauth2/@me";
|
|
103
103
|
export declare const oauth2TokenExchange: () => "oauth2/token";
|
|
104
104
|
export declare const oauth2TokenRevocation: () => "oauth2/token/revoke";
|
|
105
|
-
export declare const interactionCallback: (
|
|
105
|
+
export declare const interactionCallback: (interactionId: snowflake, interactionToken: string) => `interactions/${string}/${string}/callback`;
|
|
106
106
|
export declare const invite: (code: string) => `invites/${string}`;
|
|
107
|
-
export declare const stageInstance: (
|
|
107
|
+
export declare const stageInstance: (channelId: snowflake) => `stage-instances/${string}`;
|
|
108
108
|
export declare const stageInstances: () => "stage-instances";
|
|
109
|
-
export declare const sticker: (
|
|
109
|
+
export declare const sticker: (stickerId: snowflake) => `stickers/${string}`;
|
|
110
110
|
export declare const voiceRegions: () => "voice/regions";
|
|
111
|
+
export declare const lobbies: () => "lobbies";
|
|
112
|
+
export declare const lobby: (lobbyId: snowflake) => `lobbies/${string}`;
|
|
113
|
+
export declare const lobbyMember: (lobbyId: snowflake, userId?: snowflake | "@me") => `lobbies/${string}/members/${string}`;
|
|
114
|
+
export declare const lobbyChannelLinking: (lobbyId: snowflake) => `lobbies/${string}/channel-linking`;
|