@duque.edits/sdk 0.1.1 → 0.1.2
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/structures/bet/GuildBet.js +2 -0
- package/dist/structures/betuser/GuildBetUser.js +0 -1
- package/dist/structures/match/GuildMatch.d.ts +1 -0
- package/dist/structures/match/GuildMatch.js +10 -0
- package/dist/structures/ticket/GuildTicket.js +1 -2
- package/dist/structures/user/GuildUser.js +0 -1
- package/package.json +1 -1
|
@@ -80,5 +80,6 @@ export declare class GuildMatch {
|
|
|
80
80
|
addPlayer(id: string, name: string): Promise<GuildMatch>;
|
|
81
81
|
removePlayer(id: string, name: string): Promise<GuildMatch>;
|
|
82
82
|
update(data: Optional<APIGuildMatch>): Promise<GuildMatch>;
|
|
83
|
+
delete(): Promise<boolean>;
|
|
83
84
|
toJSON(): Record<string, unknown>;
|
|
84
85
|
}
|
|
@@ -314,6 +314,16 @@ class GuildMatch {
|
|
|
314
314
|
this.rest.matches.set(this._id, this);
|
|
315
315
|
return this;
|
|
316
316
|
}
|
|
317
|
+
async delete() {
|
|
318
|
+
const route = Routes_1.Routes.guilds.matches.resource(this.guild.id, this._id);
|
|
319
|
+
const response = await this.rest.request({
|
|
320
|
+
method: "DELETE",
|
|
321
|
+
url: route,
|
|
322
|
+
});
|
|
323
|
+
this.manager.cache.delete(this?._id);
|
|
324
|
+
this.rest.matches.delete(this?._id);
|
|
325
|
+
return response;
|
|
326
|
+
}
|
|
317
327
|
toJSON() {
|
|
318
328
|
const json = {};
|
|
319
329
|
for (const [key, value] of Object.entries(this)) {
|
|
@@ -115,7 +115,7 @@ class GuildTicket {
|
|
|
115
115
|
const response = await this.rest.request({
|
|
116
116
|
method: "PATCH",
|
|
117
117
|
url: route,
|
|
118
|
-
payload
|
|
118
|
+
payload,
|
|
119
119
|
});
|
|
120
120
|
this.customerRating = response.customerRating;
|
|
121
121
|
this.manager.cache.set(this.id, this);
|
|
@@ -153,7 +153,6 @@ class GuildTicket {
|
|
|
153
153
|
method: "DELETE",
|
|
154
154
|
url: route,
|
|
155
155
|
});
|
|
156
|
-
this.manager.cache.set(this.id, this);
|
|
157
156
|
this.manager.cache.delete(this.id);
|
|
158
157
|
return response;
|
|
159
158
|
}
|