disgroove 1.2.9 → 1.3.0-dev.19adbb0
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/Client.d.ts +40 -40
- package/dist/Client.js +75 -75
- package/dist/Client.js.map +1 -1
- package/dist/gateway/Shard.js +30 -34
- package/dist/gateway/Shard.js.map +1 -1
- package/dist/rest/RequestsManager.js +1 -1
- package/dist/rest/RequestsManager.js.map +1 -1
- package/dist/structures/Application.d.ts +70 -70
- package/dist/structures/Application.js +128 -155
- package/dist/structures/Application.js.map +1 -1
- package/dist/structures/ApplicationCommand.d.ts +4 -4
- package/dist/structures/ApplicationCommand.js +19 -19
- package/dist/structures/ApplicationCommand.js.map +1 -1
- package/dist/structures/AutoModerationRule.d.ts +2 -2
- package/dist/structures/AutoModerationRule.js +7 -7
- package/dist/structures/AutoModerationRule.js.map +1 -1
- package/dist/structures/Channel.d.ts +126 -126
- package/dist/structures/Channel.js +258 -258
- package/dist/structures/Channel.js.map +1 -1
- package/dist/structures/Emoji.d.ts +2 -2
- package/dist/structures/Emoji.js +9 -9
- package/dist/structures/Emoji.js.map +1 -1
- package/dist/structures/Entitlement.d.ts +24 -0
- package/dist/structures/Entitlement.js +68 -0
- package/dist/structures/Entitlement.js.map +1 -0
- package/dist/structures/Guild.d.ts +305 -305
- package/dist/structures/Guild.js +616 -624
- package/dist/structures/Guild.js.map +1 -1
- package/dist/structures/GuildMember.d.ts +9 -9
- package/dist/structures/GuildMember.js +30 -30
- package/dist/structures/GuildMember.js.map +1 -1
- package/dist/structures/GuildScheduledEvent.d.ts +2 -2
- package/dist/structures/GuildScheduledEvent.js +5 -5
- package/dist/structures/GuildScheduledEvent.js.map +1 -1
- package/dist/structures/GuildTemplate.d.ts +4 -4
- package/dist/structures/GuildTemplate.js +9 -9
- package/dist/structures/GuildTemplate.js.map +1 -1
- package/dist/structures/Integration.js +2 -2
- package/dist/structures/Integration.js.map +1 -1
- package/dist/structures/Interaction.d.ts +27 -27
- package/dist/structures/Interaction.js +90 -83
- package/dist/structures/Interaction.js.map +1 -1
- package/dist/structures/Invite.js +1 -1
- package/dist/structures/Invite.js.map +1 -1
- package/dist/structures/Message.d.ts +20 -17
- package/dist/structures/Message.js +81 -55
- package/dist/structures/Message.js.map +1 -1
- package/dist/structures/PartialApplication.d.ts +70 -70
- package/dist/structures/PartialApplication.js +128 -155
- package/dist/structures/PartialApplication.js.map +1 -1
- package/dist/structures/Role.d.ts +2 -2
- package/dist/structures/Role.js +7 -7
- package/dist/structures/Role.js.map +1 -1
- package/dist/structures/SKU.d.ts +23 -0
- package/dist/structures/SKU.js +63 -0
- package/dist/structures/SKU.js.map +1 -0
- package/dist/structures/StageInstance.d.ts +2 -2
- package/dist/structures/StageInstance.js +7 -7
- package/dist/structures/StageInstance.js.map +1 -1
- package/dist/structures/Sticker.d.ts +2 -2
- package/dist/structures/Sticker.js +9 -9
- package/dist/structures/Sticker.js.map +1 -1
- package/dist/structures/Team.js +2 -2
- package/dist/structures/Team.js.map +1 -1
- package/dist/structures/TestEntitlement.d.ts +23 -0
- package/dist/structures/TestEntitlement.js +61 -0
- package/dist/structures/TestEntitlement.js.map +1 -0
- package/dist/structures/UnavailableGuild.d.ts +305 -305
- package/dist/structures/UnavailableGuild.js +609 -610
- package/dist/structures/UnavailableGuild.js.map +1 -1
- package/dist/structures/User.d.ts +11 -11
- package/dist/structures/User.js +35 -34
- package/dist/structures/User.js.map +1 -1
- package/dist/structures/Webhook.d.ts +26 -26
- package/dist/structures/Webhook.js +115 -147
- package/dist/structures/Webhook.js.map +1 -1
- package/dist/structures/index.d.ts +3 -0
- package/dist/structures/index.js +3 -0
- package/dist/structures/index.js.map +1 -1
- package/dist/types/interaction.d.ts +12 -12
- package/dist/types/message-components.d.ts +4 -4
- package/dist/utils/Util.d.ts +8 -482
- package/dist/utils/Util.js +169 -150
- package/dist/utils/Util.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,14 +18,14 @@ export declare class Sticker extends Base {
|
|
|
18
18
|
sortValue?: number;
|
|
19
19
|
constructor(data: RawSticker, client: Client);
|
|
20
20
|
protected patch(data: RawSticker): void;
|
|
21
|
+
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
|
22
|
+
delete(reason?: string): void;
|
|
21
23
|
/** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
|
|
22
24
|
edit(options: {
|
|
23
25
|
name?: string;
|
|
24
26
|
description?: string | null;
|
|
25
27
|
tags?: string;
|
|
26
28
|
}, reason?: string): Promise<Sticker>;
|
|
27
|
-
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
|
28
|
-
delete(reason?: string): void;
|
|
29
29
|
toRaw(): RawSticker;
|
|
30
30
|
toJSON(): JSONSticker;
|
|
31
31
|
}
|
|
@@ -41,6 +41,14 @@ class Sticker extends _1.Base {
|
|
|
41
41
|
if (data.sort_value !== undefined)
|
|
42
42
|
this.sortValue = data.sort_value;
|
|
43
43
|
}
|
|
44
|
+
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
|
45
|
+
delete(reason) {
|
|
46
|
+
if (!this.guildId)
|
|
47
|
+
throw new Error("[disgroove] Guild ID not found");
|
|
48
|
+
this.client.rest.delete(rest_1.Endpoints.guildSticker(this.guildId, this.id), {
|
|
49
|
+
reason,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
44
52
|
/** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
|
|
45
53
|
async edit(options, reason) {
|
|
46
54
|
if (!this.guildId)
|
|
@@ -54,20 +62,12 @@ class Sticker extends _1.Base {
|
|
|
54
62
|
reason,
|
|
55
63
|
}), this.client);
|
|
56
64
|
}
|
|
57
|
-
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
|
58
|
-
delete(reason) {
|
|
59
|
-
if (!this.guildId)
|
|
60
|
-
throw new Error("[disgroove] Guild ID not found");
|
|
61
|
-
this.client.rest.delete(rest_1.Endpoints.guildSticker(this.guildId, this.id), {
|
|
62
|
-
reason,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
65
|
toRaw() {
|
|
66
66
|
return this.raw;
|
|
67
67
|
}
|
|
68
68
|
toJSON() {
|
|
69
69
|
return {
|
|
70
|
-
|
|
70
|
+
...super.toJSON(),
|
|
71
71
|
packId: this.packId,
|
|
72
72
|
name: this.name,
|
|
73
73
|
description: this.description,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sticker.js","sourceRoot":"","sources":["../../src/structures/Sticker.ts"],"names":[],"mappings":";;;AAAA,wBAA+B;AAG/B,kCAAoC;AAGpC,4DAA4D;AAC5D,MAAa,OAAQ,SAAQ,OAAI;IACZ,GAAG,CAAa;IACnC,MAAM,CAAU;IAChB,IAAI,CAAS;IACb,WAAW,CAAgB;IAC3B,IAAI,CAAS;IACb,KAAK,CAAU;IACf,IAAI,CAAe;IACnB,UAAU,CAAqB;IAC/B,SAAS,CAAW;IACpB,OAAO,CAAU;IACjB,IAAI,CAAQ;IACZ,SAAS,CAAU;IAEnB,YAAY,IAAgB,EAAE,MAAc;QAC1C,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QAEnC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAEkB,KAAK,CAAC,IAAgB;QACvC,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAA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,CAAC,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAErE,OAAO,IAAI,OAAO,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAC1B,gBAAS,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EAC7C;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB;YACD,MAAM;SACP,CACF,EACD,IAAI,CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;CACF;AA5FD,0BA4FC"}
|
package/dist/structures/Team.js
CHANGED
|
@@ -16,7 +16,7 @@ class Team extends _1.Base {
|
|
|
16
16
|
this.members = data.members.map((teamMember) => ({
|
|
17
17
|
membershipState: teamMember.membership_state,
|
|
18
18
|
teamId: teamMember.team_id,
|
|
19
|
-
user: new _1.User(teamMember.user, client),
|
|
19
|
+
user: new _1.User(teamMember.user, client).toJSON(),
|
|
20
20
|
role: teamMember.role,
|
|
21
21
|
}));
|
|
22
22
|
this.name = data.name;
|
|
@@ -28,7 +28,7 @@ class Team extends _1.Base {
|
|
|
28
28
|
toJSON() {
|
|
29
29
|
return {
|
|
30
30
|
icon: this.icon,
|
|
31
|
-
|
|
31
|
+
...super.toJSON(),
|
|
32
32
|
members: this.members,
|
|
33
33
|
name: this.name,
|
|
34
34
|
ownerUserId: this.ownerUserId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Team.js","sourceRoot":"","sources":["../../src/structures/Team.ts"],"names":[],"mappings":";;;AAAA,wBAA+B;AAI/B,uDAAuD;AACvD,MAAa,IAAK,SAAQ,OAAI;IACT,GAAG,CAAU;IAChC,IAAI,CAAgB;IACpB,OAAO,CAAwB;IAC/B,IAAI,CAAS;IACb,WAAW,CAAS;IAEpB,YAAY,IAAa,EAAE,MAAc;QACvC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC/C,eAAe,EAAE,UAAU,CAAC,gBAAgB;YAC5C,MAAM,EAAE,UAAU,CAAC,OAAO;YAC1B,IAAI,EAAE,IAAI,OAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Team.js","sourceRoot":"","sources":["../../src/structures/Team.ts"],"names":[],"mappings":";;;AAAA,wBAA+B;AAI/B,uDAAuD;AACvD,MAAa,IAAK,SAAQ,OAAI;IACT,GAAG,CAAU;IAChC,IAAI,CAAgB;IACpB,OAAO,CAAwB;IAC/B,IAAI,CAAS;IACb,WAAW,CAAS;IAEpB,YAAY,IAAa,EAAE,MAAc;QACvC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC/C,eAAe,EAAE,UAAU,CAAC,gBAAgB;YAC5C,MAAM,EAAE,UAAU,CAAC,OAAO;YAC1B,IAAI,EAAE,IAAI,OAAI,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE;YAChD,IAAI,EAAE,UAAU,CAAC,IAAI;SACtB,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC;IACxC,CAAC;IAEQ,KAAK;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;CACF;AAnCD,oBAmCC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Client } from "../Client";
|
|
2
|
+
import type { JSONEntitlement, RawEntitlement } from "../types";
|
|
3
|
+
import { Base } from ".";
|
|
4
|
+
import type { EntitlementTypes } from "../constants";
|
|
5
|
+
/** https://discord.com/developers/docs/monetization/entitlements */
|
|
6
|
+
export declare class TestEntitlement extends Base {
|
|
7
|
+
protected raw: Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">;
|
|
8
|
+
skuId: string;
|
|
9
|
+
applicationId: string;
|
|
10
|
+
userId?: string;
|
|
11
|
+
promotionId?: string | null;
|
|
12
|
+
type: EntitlementTypes;
|
|
13
|
+
deleted: boolean;
|
|
14
|
+
giftCodeFlags?: number;
|
|
15
|
+
consumed?: boolean;
|
|
16
|
+
guildId?: string;
|
|
17
|
+
constructor(data: Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">, client: Client);
|
|
18
|
+
protected patch(data: Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">): void;
|
|
19
|
+
/** https://discord.com/developers/docs/monetization/entitlements */
|
|
20
|
+
delete(): void;
|
|
21
|
+
toRaw(): Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">;
|
|
22
|
+
toJSON(): Omit<JSONEntitlement, "startsAt" | "endsAt" | "subscriptionId">;
|
|
23
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestEntitlement = void 0;
|
|
4
|
+
const rest_1 = require("../rest");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
/** https://discord.com/developers/docs/monetization/entitlements */
|
|
7
|
+
class TestEntitlement extends _1.Base {
|
|
8
|
+
raw;
|
|
9
|
+
skuId;
|
|
10
|
+
applicationId;
|
|
11
|
+
userId;
|
|
12
|
+
promotionId; // Undocumented
|
|
13
|
+
type;
|
|
14
|
+
deleted;
|
|
15
|
+
giftCodeFlags; // Undocumented
|
|
16
|
+
consumed; // Undocumented
|
|
17
|
+
guildId;
|
|
18
|
+
constructor(data, client) {
|
|
19
|
+
super(data.id, client);
|
|
20
|
+
this.raw = data;
|
|
21
|
+
this.skuId = data.sku_id;
|
|
22
|
+
this.applicationId = data.application_id;
|
|
23
|
+
this.type = data.type;
|
|
24
|
+
this.deleted = data.deleted;
|
|
25
|
+
}
|
|
26
|
+
patch(data) {
|
|
27
|
+
if (data.user_id !== undefined)
|
|
28
|
+
this.userId = data.user_id;
|
|
29
|
+
if (data.promotion_id !== undefined)
|
|
30
|
+
this.promotionId = data.promotion_id;
|
|
31
|
+
if (data.gift_code_flags !== undefined)
|
|
32
|
+
this.giftCodeFlags = data.gift_code_flags;
|
|
33
|
+
if (data.consumed !== undefined)
|
|
34
|
+
this.consumed = data.consumed;
|
|
35
|
+
if (data.guild_id !== undefined)
|
|
36
|
+
this.guildId = data.guild_id;
|
|
37
|
+
}
|
|
38
|
+
/** https://discord.com/developers/docs/monetization/entitlements */
|
|
39
|
+
delete() {
|
|
40
|
+
this.client.rest.delete(rest_1.Endpoints.applicationEntitlement(this.applicationId, this.id));
|
|
41
|
+
}
|
|
42
|
+
toRaw() {
|
|
43
|
+
return this.raw;
|
|
44
|
+
}
|
|
45
|
+
toJSON() {
|
|
46
|
+
return {
|
|
47
|
+
id: this.id,
|
|
48
|
+
skuId: this.skuId,
|
|
49
|
+
applicationId: this.applicationId,
|
|
50
|
+
userId: this.userId,
|
|
51
|
+
promotionId: this.promotionId,
|
|
52
|
+
type: this.type,
|
|
53
|
+
deleted: this.deleted,
|
|
54
|
+
giftCodeFlags: this.giftCodeFlags,
|
|
55
|
+
consumed: this.consumed,
|
|
56
|
+
guildId: this.guildId,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.TestEntitlement = TestEntitlement;
|
|
61
|
+
//# sourceMappingURL=TestEntitlement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestEntitlement.js","sourceRoot":"","sources":["../../src/structures/TestEntitlement.ts"],"names":[],"mappings":";;;AACA,kCAAoC;AAEpC,wBAAyB;AAGzB,oEAAoE;AACpE,MAAa,eAAgB,SAAQ,OAAI;IACpB,GAAG,CAGpB;IACF,KAAK,CAAS;IACd,aAAa,CAAS;IACtB,MAAM,CAAU;IAChB,WAAW,CAAiB,CAAC,eAAe;IAC5C,IAAI,CAAmB;IACvB,OAAO,C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