disgroove 1.3.4-test.1 → 1.3.4
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 +9 -3
- package/dist/lib/Client.d.ts +242 -0
- package/dist/lib/Client.js +256 -0
- package/dist/lib/Client.js.map +1 -0
- package/dist/lib/constants.d.ts +1084 -0
- package/dist/lib/constants.js +1163 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/gateway/Shard.d.ts +25 -0
- package/dist/lib/gateway/Shard.js +522 -0
- package/dist/lib/gateway/Shard.js.map +1 -0
- package/dist/lib/gateway/ShardsManager.d.ts +6 -0
- package/dist/lib/gateway/ShardsManager.js +14 -0
- package/dist/lib/gateway/ShardsManager.js.map +1 -0
- package/dist/lib/gateway/index.d.ts +2 -0
- package/dist/lib/gateway/index.js +19 -0
- package/dist/lib/gateway/index.js.map +1 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.js +24 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/rest/CDN.d.ts +21 -0
- package/dist/lib/rest/CDN.js +46 -0
- package/dist/lib/rest/CDN.js.map +1 -0
- package/dist/lib/rest/Endpoints.d.ts +94 -0
- package/dist/lib/rest/Endpoints.js +211 -0
- package/dist/lib/rest/Endpoints.js.map +1 -0
- package/dist/lib/rest/REST.d.ts +17 -0
- package/dist/lib/rest/REST.js +35 -0
- package/dist/lib/rest/REST.js.map +1 -0
- package/dist/lib/rest/RequestsManager.d.ts +22 -0
- package/dist/lib/rest/RequestsManager.js +123 -0
- package/dist/lib/rest/RequestsManager.js.map +1 -0
- package/dist/lib/rest/index.d.ts +4 -0
- package/dist/lib/rest/index.js +34 -0
- package/dist/lib/rest/index.js.map +1 -0
- package/dist/lib/structures/Application.d.ts +174 -0
- package/dist/lib/structures/Application.js +328 -0
- package/dist/lib/structures/Application.js.map +1 -0
- package/dist/lib/structures/ApplicationCommand.d.ts +45 -0
- package/dist/lib/structures/ApplicationCommand.js +127 -0
- package/dist/lib/structures/ApplicationCommand.js.map +1 -0
- package/dist/lib/structures/AuditLog.d.ts +19 -0
- package/dist/lib/structures/AuditLog.js +101 -0
- package/dist/lib/structures/AuditLog.js.map +1 -0
- package/dist/lib/structures/AutoModerationRule.d.ts +34 -0
- package/dist/lib/structures/AutoModerationRule.js +96 -0
- package/dist/lib/structures/AutoModerationRule.js.map +1 -0
- package/dist/lib/structures/Base.d.ts +10 -0
- package/dist/lib/structures/Base.js +23 -0
- package/dist/lib/structures/Base.js.map +1 -0
- package/dist/lib/structures/Channel.d.ts +254 -0
- package/dist/lib/structures/Channel.js +592 -0
- package/dist/lib/structures/Channel.js.map +1 -0
- package/dist/lib/structures/ClientApplication.d.ts +150 -0
- package/dist/lib/structures/ClientApplication.js +241 -0
- package/dist/lib/structures/ClientApplication.js.map +1 -0
- package/dist/lib/structures/Emoji.d.ts +26 -0
- package/dist/lib/structures/Emoji.js +75 -0
- package/dist/lib/structures/Emoji.js.map +1 -0
- package/dist/lib/structures/Entitlement.d.ts +24 -0
- package/dist/lib/structures/Entitlement.js +68 -0
- package/dist/lib/structures/Entitlement.js.map +1 -0
- package/dist/lib/structures/Guild.d.ts +474 -0
- package/dist/lib/structures/Guild.js +1141 -0
- package/dist/lib/structures/Guild.js.map +1 -0
- package/dist/lib/structures/GuildMember.d.ts +49 -0
- package/dist/lib/structures/GuildMember.js +146 -0
- package/dist/lib/structures/GuildMember.js.map +1 -0
- package/dist/lib/structures/GuildScheduledEvent.d.ts +49 -0
- package/dist/lib/structures/GuildScheduledEvent.js +118 -0
- package/dist/lib/structures/GuildScheduledEvent.js.map +1 -0
- package/dist/lib/structures/GuildTemplate.d.ts +30 -0
- package/dist/lib/structures/GuildTemplate.js +72 -0
- package/dist/lib/structures/GuildTemplate.js.map +1 -0
- package/dist/lib/structures/IdentifiableBase.d.ts +15 -0
- package/dist/lib/structures/IdentifiableBase.js +25 -0
- package/dist/lib/structures/IdentifiableBase.js.map +1 -0
- package/dist/lib/structures/Integration.d.ts +31 -0
- package/dist/lib/structures/Integration.js +103 -0
- package/dist/lib/structures/Integration.js.map +1 -0
- package/dist/lib/structures/Interaction.d.ts +76 -0
- package/dist/lib/structures/Interaction.js +346 -0
- package/dist/lib/structures/Interaction.js.map +1 -0
- package/dist/lib/structures/Invite.d.ts +26 -0
- package/dist/lib/structures/Invite.js +82 -0
- package/dist/lib/structures/Invite.js.map +1 -0
- package/dist/lib/structures/Message.d.ts +86 -0
- package/dist/lib/structures/Message.js +303 -0
- package/dist/lib/structures/Message.js.map +1 -0
- package/dist/lib/structures/Role.d.ts +37 -0
- package/dist/lib/structures/Role.js +90 -0
- package/dist/lib/structures/Role.js.map +1 -0
- package/dist/lib/structures/SKU.d.ts +23 -0
- package/dist/lib/structures/SKU.js +63 -0
- package/dist/lib/structures/SKU.js.map +1 -0
- package/dist/lib/structures/StageInstance.d.ts +24 -0
- package/dist/lib/structures/StageInstance.js +57 -0
- package/dist/lib/structures/StageInstance.js.map +1 -0
- package/dist/lib/structures/Sticker.d.ts +31 -0
- package/dist/lib/structures/Sticker.js +86 -0
- package/dist/lib/structures/Sticker.js.map +1 -0
- package/dist/lib/structures/Team.d.ts +14 -0
- package/dist/lib/structures/Team.js +39 -0
- package/dist/lib/structures/Team.js.map +1 -0
- package/dist/lib/structures/TestEntitlement.d.ts +23 -0
- package/dist/lib/structures/TestEntitlement.js +61 -0
- package/dist/lib/structures/TestEntitlement.js.map +1 -0
- package/dist/lib/structures/UnavailableGuild.d.ts +11 -0
- package/dist/lib/structures/UnavailableGuild.js +25 -0
- package/dist/lib/structures/UnavailableGuild.js.map +1 -0
- package/dist/lib/structures/User.d.ts +63 -0
- package/dist/lib/structures/User.js +177 -0
- package/dist/lib/structures/User.js.map +1 -0
- package/dist/lib/structures/VoiceState.d.ts +24 -0
- package/dist/lib/structures/VoiceState.js +66 -0
- package/dist/lib/structures/VoiceState.js.map +1 -0
- package/dist/lib/structures/Webhook.d.ts +82 -0
- package/dist/lib/structures/Webhook.js +223 -0
- package/dist/lib/structures/Webhook.js.map +1 -0
- package/dist/lib/structures/index.d.ts +28 -0
- package/dist/lib/structures/index.js +45 -0
- package/dist/lib/structures/index.js.map +1 -0
- package/dist/lib/types/application-command.d.ts +102 -0
- package/dist/lib/types/application-command.js +3 -0
- package/dist/lib/types/application-command.js.map +1 -0
- package/dist/lib/types/application-role-connection-metadata.d.ts +18 -0
- package/dist/lib/types/application-role-connection-metadata.js +3 -0
- package/dist/lib/types/application-role-connection-metadata.js.map +1 -0
- package/dist/lib/types/application.d.ts +66 -0
- package/dist/lib/types/application.js +3 -0
- package/dist/lib/types/application.js.map +1 -0
- package/dist/lib/types/audit-log.d.ts +83 -0
- package/dist/lib/types/audit-log.js +3 -0
- package/dist/lib/types/audit-log.js.map +1 -0
- package/dist/lib/types/auto-moderation.d.ts +65 -0
- package/dist/lib/types/auto-moderation.js +3 -0
- package/dist/lib/types/auto-moderation.js.map +1 -0
- package/dist/lib/types/channel.d.ts +456 -0
- package/dist/lib/types/channel.js +3 -0
- package/dist/lib/types/channel.js.map +1 -0
- package/dist/lib/types/emoji.d.ts +22 -0
- package/dist/lib/types/emoji.js +3 -0
- package/dist/lib/types/emoji.js.map +1 -0
- package/dist/lib/types/entitlements.d.ts +32 -0
- package/dist/lib/types/entitlements.js +3 -0
- package/dist/lib/types/entitlements.js.map +1 -0
- package/dist/lib/types/gateway-events.d.ts +806 -0
- package/dist/lib/types/gateway-events.js +3 -0
- package/dist/lib/types/gateway-events.js.map +1 -0
- package/dist/lib/types/guild-scheduled-event.d.ts +57 -0
- package/dist/lib/types/guild-scheduled-event.js +3 -0
- package/dist/lib/types/guild-scheduled-event.js.map +1 -0
- package/dist/lib/types/guild-template.d.ts +28 -0
- package/dist/lib/types/guild-template.js +3 -0
- package/dist/lib/types/guild-template.js.map +1 -0
- package/dist/lib/types/guild.d.ts +334 -0
- package/dist/lib/types/guild.js +3 -0
- package/dist/lib/types/guild.js.map +1 -0
- package/dist/lib/types/index.d.ts +23 -0
- package/dist/lib/types/index.js +40 -0
- package/dist/lib/types/index.js.map +1 -0
- package/dist/lib/types/interaction.d.ts +171 -0
- package/dist/lib/types/interaction.js +3 -0
- package/dist/lib/types/interaction.js.map +1 -0
- package/dist/lib/types/invite.d.ts +59 -0
- package/dist/lib/types/invite.js +3 -0
- package/dist/lib/types/invite.js.map +1 -0
- package/dist/lib/types/message-components.d.ts +100 -0
- package/dist/lib/types/message-components.js +3 -0
- package/dist/lib/types/message-components.js.map +1 -0
- package/dist/lib/types/role.d.ts +47 -0
- package/dist/lib/types/role.js +3 -0
- package/dist/lib/types/role.js.map +1 -0
- package/dist/lib/types/sku.d.ts +30 -0
- package/dist/lib/types/sku.js +3 -0
- package/dist/lib/types/sku.js.map +1 -0
- package/dist/lib/types/stage-instance.d.ts +20 -0
- package/dist/lib/types/stage-instance.js +3 -0
- package/dist/lib/types/stage-instance.js.map +1 -0
- package/dist/lib/types/sticker.d.ts +61 -0
- package/dist/lib/types/sticker.js +3 -0
- package/dist/lib/types/sticker.js.map +1 -0
- package/dist/lib/types/team.d.ts +30 -0
- package/dist/lib/types/team.js +3 -0
- package/dist/lib/types/team.js.map +1 -0
- package/dist/lib/types/user.d.ts +77 -0
- package/dist/lib/types/user.js +3 -0
- package/dist/lib/types/user.js.map +1 -0
- package/dist/lib/types/voice.d.ts +47 -0
- package/dist/lib/types/voice.js +3 -0
- package/dist/lib/types/voice.js.map +1 -0
- package/dist/lib/types/webhook.d.ts +31 -0
- package/dist/lib/types/webhook.js +3 -0
- package/dist/lib/types/webhook.js.map +1 -0
- package/dist/lib/utils/Collection.d.ts +24 -0
- package/dist/lib/utils/Collection.js +65 -0
- package/dist/lib/utils/Collection.js.map +1 -0
- package/dist/lib/utils/Util.d.ts +15 -0
- package/dist/lib/utils/Util.js +543 -0
- package/dist/lib/utils/Util.js.map +1 -0
- package/dist/lib/utils/errors.d.ts +12 -0
- package/dist/lib/utils/errors.js +25 -0
- package/dist/lib/utils/errors.js.map +1 -0
- package/dist/lib/utils/index.d.ts +3 -0
- package/dist/lib/utils/index.js +20 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/package.json +8 -14
- package/package.json +8 -14
@@ -0,0 +1,47 @@
|
|
1
|
+
import type { JSONGuildMember, RawGuildMember } from ".";
|
2
|
+
/** https://discord.com/developers/docs/resources/voice#voice-state-object-voice-state-structure */
|
3
|
+
export interface RawVoiceState {
|
4
|
+
guild_id?: string;
|
5
|
+
channel_id: string | null;
|
6
|
+
user_id: string;
|
7
|
+
member?: RawGuildMember;
|
8
|
+
session_id: string;
|
9
|
+
deaf: boolean;
|
10
|
+
mute: boolean;
|
11
|
+
self_deaf: boolean;
|
12
|
+
self_mute: boolean;
|
13
|
+
self_stream?: boolean;
|
14
|
+
self_video: boolean;
|
15
|
+
suppress: boolean;
|
16
|
+
request_to_speak_timestamp: string | null;
|
17
|
+
}
|
18
|
+
/** https://discord.com/developers/docs/resources/voice#voice-region-object-voice-region-structure */
|
19
|
+
export interface RawVoiceRegion {
|
20
|
+
id: string;
|
21
|
+
name: string;
|
22
|
+
optimal: boolean;
|
23
|
+
deprecated: boolean;
|
24
|
+
custom: boolean;
|
25
|
+
}
|
26
|
+
export interface JSONVoiceState {
|
27
|
+
guildId?: string;
|
28
|
+
channelId: string | null;
|
29
|
+
userId: string;
|
30
|
+
member?: JSONGuildMember;
|
31
|
+
sessionId: string;
|
32
|
+
deaf: boolean;
|
33
|
+
mute: boolean;
|
34
|
+
selfDeaf: boolean;
|
35
|
+
selfMute: boolean;
|
36
|
+
selfStream?: boolean;
|
37
|
+
selfVideo: boolean;
|
38
|
+
suppress: boolean;
|
39
|
+
requestToSpeakTimestamp: string | null;
|
40
|
+
}
|
41
|
+
export interface JSONVoiceRegion {
|
42
|
+
id: string;
|
43
|
+
name: string;
|
44
|
+
optimal: boolean;
|
45
|
+
deprecated: boolean;
|
46
|
+
custom: boolean;
|
47
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"voice.js","sourceRoot":"","sources":["../../../lib/types/voice.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { WebhookTypes } from "../constants";
|
2
|
+
import type { JSONChannel, JSONGuild, JSONUser, RawChannel, RawGuild, RawUser } from ".";
|
3
|
+
/** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure */
|
4
|
+
export interface RawWebhook {
|
5
|
+
id: string;
|
6
|
+
type: WebhookTypes;
|
7
|
+
guild_id?: string | null;
|
8
|
+
channel_id: string | null;
|
9
|
+
user?: RawUser;
|
10
|
+
name: string | null;
|
11
|
+
avatar: string | null;
|
12
|
+
token?: string;
|
13
|
+
application_id: string | null;
|
14
|
+
source_guild?: RawGuild;
|
15
|
+
source_channel?: RawChannel;
|
16
|
+
url?: string;
|
17
|
+
}
|
18
|
+
export interface JSONWebhook {
|
19
|
+
id: string;
|
20
|
+
type: WebhookTypes;
|
21
|
+
guildId?: string | null;
|
22
|
+
channelId: string | null;
|
23
|
+
user?: JSONUser;
|
24
|
+
name: string | null;
|
25
|
+
avatar: string | null;
|
26
|
+
token?: string;
|
27
|
+
applicationId: string | null;
|
28
|
+
sourceGuild?: JSONGuild;
|
29
|
+
sourceChannel?: JSONChannel;
|
30
|
+
url?: string;
|
31
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../lib/types/webhook.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export declare class Collection<K, V> extends Map<K, V> {
|
2
|
+
get empty(): boolean;
|
3
|
+
every<T extends V, ThisArg = Collection<K, V>>(predicate: (value: V, index: number, array: Array<V>) => value is T, thisArg?: ThisArg): this is Array<T>;
|
4
|
+
every<ThisArg = Collection<K, V>>(predicate: (value: V, index: number, array: Array<V>) => unknown, thisArg?: ThisArg): boolean;
|
5
|
+
filter<S extends V, ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, array: Array<V>) => value is S, thisArg?: ThisArg): Array<S>;
|
6
|
+
filter<ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, array: Array<V>) => unknown, thisArg?: ThisArg): Array<V>;
|
7
|
+
find<S extends V, ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, obj: Array<V>) => value is S, thisArg?: ThisArg): S | undefined;
|
8
|
+
find<ThisArg = Collection<K, V>>(predicate: (this: ThisArg, value: V, index: number, obj: Array<V>) => unknown, thisArg?: ThisArg): V | undefined;
|
9
|
+
findIndex(predicate: (value: V, index: number, obj: Array<V>) => unknown, thisArg?: unknown): number;
|
10
|
+
first(): V | undefined;
|
11
|
+
first(amount: number): Array<V>;
|
12
|
+
last(): V | undefined;
|
13
|
+
last(amount: number): Array<V>;
|
14
|
+
map<T>(predicate: (value: V, index: number, obj: Array<V>) => T, thisArg?: unknown): Array<T>;
|
15
|
+
random(): V | undefined;
|
16
|
+
reduce(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V): V;
|
17
|
+
reduce(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V, initialValue: V): V;
|
18
|
+
reduce<T>(predicate: (previousValue: T, currentValue: V, currentIndex: number, array: Array<V>) => T, initialValue: T): T;
|
19
|
+
reduceRight(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V): V;
|
20
|
+
reduceRight(predicate: (previousValue: V, currentValue: V, currentIndex: number, array: Array<V>) => V, initialValue: V): V;
|
21
|
+
reduceRight<T>(predicate: (previousValue: T, currentValue: V, currentIndex: number, array: Array<V>) => T, initialValue: T): T;
|
22
|
+
some<ThisArg = Collection<K, V>>(predicate: (value: V, index: number, array: Array<V>) => unknown, thisArg?: ThisArg): boolean;
|
23
|
+
toArray(): Array<V>;
|
24
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Collection = void 0;
|
4
|
+
class Collection extends Map {
|
5
|
+
get empty() {
|
6
|
+
return this.size === 0;
|
7
|
+
}
|
8
|
+
every(predicate, thisArg) {
|
9
|
+
return this.toArray().every(predicate, thisArg);
|
10
|
+
}
|
11
|
+
filter(predicate, thisArg) {
|
12
|
+
return this.toArray().filter(predicate, thisArg);
|
13
|
+
}
|
14
|
+
find(predicate, thisArg) {
|
15
|
+
return this.toArray().find(predicate, thisArg);
|
16
|
+
}
|
17
|
+
findIndex(predicate, thisArg) {
|
18
|
+
return this.toArray().findIndex(predicate, thisArg);
|
19
|
+
}
|
20
|
+
first(amount) {
|
21
|
+
if (amount === undefined) {
|
22
|
+
const iterable = this.values();
|
23
|
+
return iterable.next().value;
|
24
|
+
}
|
25
|
+
if (amount < 0)
|
26
|
+
return this.last(amount * -1);
|
27
|
+
amount = Math.min(amount, this.size);
|
28
|
+
const iterable = this.values();
|
29
|
+
return Array.from({ length: amount }, () => iterable.next().value);
|
30
|
+
}
|
31
|
+
last(amount) {
|
32
|
+
const iterator = Array.from(this.values());
|
33
|
+
if (amount === undefined)
|
34
|
+
return iterator.at(-1);
|
35
|
+
if (amount < 0)
|
36
|
+
return this.first(amount * -1);
|
37
|
+
if (!amount)
|
38
|
+
return [];
|
39
|
+
return iterator.slice(-amount);
|
40
|
+
}
|
41
|
+
map(predicate, thisArg) {
|
42
|
+
return this.toArray().map(predicate, thisArg);
|
43
|
+
}
|
44
|
+
random() {
|
45
|
+
if (this.empty) {
|
46
|
+
return undefined;
|
47
|
+
}
|
48
|
+
const iterable = Array.from(this.values());
|
49
|
+
return iterable[Math.floor(Math.random() * iterable.length)];
|
50
|
+
}
|
51
|
+
reduce(predicate, initialValue) {
|
52
|
+
return this.toArray().reduce(predicate, initialValue);
|
53
|
+
}
|
54
|
+
reduceRight(predicate, initialValue) {
|
55
|
+
return this.toArray().reduceRight(predicate, initialValue);
|
56
|
+
}
|
57
|
+
some(predicate, thisArg) {
|
58
|
+
return this.toArray().some(predicate, thisArg);
|
59
|
+
}
|
60
|
+
toArray() {
|
61
|
+
return Array.from(this.values());
|
62
|
+
}
|
63
|
+
}
|
64
|
+
exports.Collection = Collection;
|
65
|
+
//# sourceMappingURL=Collection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../lib/utils/Collection.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { JSONActionRow, JSONApplicationCommand, JSONAttachment, JSONChannel, JSONEmbed, JSONEmoji, JSONRole, JSONUser, PresenceUpdateEventFields, RawActionRow, RawApplicationCommand, RawAttachment, RawChannel, RawEmbed, RawEmoji, RawPresenceUpdateEventFields, RawRole, RawUser } from "../types";
|
2
|
+
import type { Client } from "../Client";
|
3
|
+
export declare class Util {
|
4
|
+
applicationCommandToRaw(command: Partial<JSONApplicationCommand>): Partial<RawApplicationCommand>;
|
5
|
+
attachmentToJSON(attachment: RawAttachment): JSONAttachment;
|
6
|
+
channelToRaw(channel: JSONChannel): RawChannel;
|
7
|
+
embedsToJSON(embeds: Array<RawEmbed>): Array<JSONEmbed>;
|
8
|
+
embedsToRaw(embeds: Array<JSONEmbed>): Array<RawEmbed>;
|
9
|
+
emojiToRaw(emoji: JSONEmoji): RawEmoji;
|
10
|
+
messageComponentsToJSON(components: Array<RawActionRow>): Array<JSONActionRow>;
|
11
|
+
messageComponentsToRaw(components: Array<JSONActionRow>): Array<RawActionRow>;
|
12
|
+
presenceToREST(presence: RawPresenceUpdateEventFields, client: Client): PresenceUpdateEventFields;
|
13
|
+
roleToRaw(role: JSONRole | Partial<JSONRole>): RawRole | Partial<RawRole>;
|
14
|
+
userToRaw(user: JSONUser): RawUser;
|
15
|
+
}
|