From 2c85a763f4ed56b7f9f1f8e503a12a59a7a10bd9 Mon Sep 17 00:00:00 2001 From: TheDevYellowy Date: Thu, 22 Dec 2022 03:14:10 -0800 Subject: [PATCH] feat: remove a team --- src/structures/Team.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/structures/Team.js b/src/structures/Team.js index 06d154e..e2745a2 100644 --- a/src/structures/Team.js +++ b/src/structures/Team.js @@ -130,6 +130,16 @@ class Team extends Base { await this.client.api.teams[this.id].members[userID].delete(); } + /** + * Delete this team + * @param {string} code The 2fa code + * @returns {Promise} + */ + async delete(code) { + await this.client.api.teams[this.id].delete({ data: { code: code } }); + return this.client.developerPortal.teams.delete(this.id); + } + /** * When concatenated with a string, this automatically returns the Team's name instead of the * Team object.