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.