disgroove 1.2.4-dev.6674041 → 1.2.4-dev.e7166c3
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.
|
@@ -25,7 +25,7 @@ class RequestsManager {
|
|
|
25
25
|
}
|
|
26
26
|
let headers = {
|
|
27
27
|
Authorization: `${this.auth} ${this.token}`,
|
|
28
|
-
"User-Agent": `DiscordBot (https://github.com/XenKys/disgroove, 1.2.4-dev.
|
|
28
|
+
"User-Agent": `DiscordBot (https://github.com/XenKys/disgroove, 1.2.4-dev.e7166c3)`,
|
|
29
29
|
};
|
|
30
30
|
let body;
|
|
31
31
|
if (method !== _1.RESTMethods.Get) {
|
|
@@ -18,6 +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#modify-guild-sticker */
|
|
22
|
+
edit(guildId: string, options: {
|
|
23
|
+
name?: string;
|
|
24
|
+
description?: string | null;
|
|
25
|
+
tags?: string;
|
|
26
|
+
}, reason?: string): Promise<Sticker>;
|
|
27
|
+
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
|
28
|
+
delete(guildId: string, reason?: string): void;
|
|
21
29
|
toRaw(): RawSticker;
|
|
22
30
|
toJSON(): JSONSticker;
|
|
23
31
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Sticker = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
|
+
const rest_1 = require("../rest");
|
|
5
6
|
/** https://discord.com/developers/docs/resources/sticker */
|
|
6
7
|
class Sticker extends _1.Base {
|
|
7
8
|
raw;
|
|
@@ -40,6 +41,23 @@ class Sticker extends _1.Base {
|
|
|
40
41
|
if (data.sort_value !== undefined)
|
|
41
42
|
this.sortValue = data.sort_value;
|
|
42
43
|
}
|
|
44
|
+
/** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
|
|
45
|
+
async edit(guildId, options, reason) {
|
|
46
|
+
return new Sticker(await this.client.rest.patch(rest_1.Endpoints.guildSticker(guildId, this.id), {
|
|
47
|
+
json: {
|
|
48
|
+
name: options.name,
|
|
49
|
+
description: options.description,
|
|
50
|
+
tags: options.tags,
|
|
51
|
+
},
|
|
52
|
+
reason,
|
|
53
|
+
}), this.client);
|
|
54
|
+
}
|
|
55
|
+
/** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
|
|
56
|
+
delete(guildId, reason) {
|
|
57
|
+
this.client.rest.delete(rest_1.Endpoints.guildSticker(guildId, this.id), {
|
|
58
|
+
reason,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
43
61
|
toRaw() {
|
|
44
62
|
return this.raw;
|
|
45
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sticker.js","sourceRoot":"","sources":["../../src/structures/Sticker.ts"],"names":[],"mappings":";;;AAAA,wBAA+B;
|
|
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;IAC5B,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;IAE1B,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,IAA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