mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
feature: teams support (#3350)
* basic teams support * export Team & TeamMember * use typedef * typings and some fixes * Update src/structures/TeamMember.js Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com> * fix Team#iconURL() * fix typings and a bug * fix states start at 1 * team icon hash can be null * fix owner typings
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
const Snowflake = require('../util/Snowflake');
|
||||
const { ClientApplicationAssetTypes, Endpoints } = require('../util/Constants');
|
||||
const Base = require('./Base');
|
||||
const Team = require('./Team');
|
||||
|
||||
const AssetTypes = Object.keys(ClientApplicationAssetTypes);
|
||||
|
||||
@@ -67,9 +68,9 @@ class ClientApplication extends Base {
|
||||
|
||||
/**
|
||||
* The owner of this OAuth application
|
||||
* @type {?User}
|
||||
* @type {User|Team}
|
||||
*/
|
||||
this.owner = data.owner ? this.client.users.add(data.owner) : null;
|
||||
this.owner = data.team ? new Team(this.client, data.team) : this.client.users.add(data.owner);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user