feat: remove a team

This commit is contained in:
TheDevYellowy 2022-12-22 03:14:10 -08:00
parent baf038539b
commit 2c85a763f4

View File

@ -130,6 +130,16 @@ class Team extends Base {
await this.client.api.teams[this.id].members[userID].delete(); await this.client.api.teams[this.id].members[userID].delete();
} }
/**
* Delete this team
* @param {string} code The 2fa code
* @returns {Promise<boolean>}
*/
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 * When concatenated with a string, this automatically returns the Team's name instead of the
* Team object. * Team object.