File tree Expand file tree Collapse file tree 2 files changed +10
-27
lines changed
Expand file tree Collapse file tree 2 files changed +10
-27
lines changed Original file line number Diff line number Diff line change @@ -79,22 +79,6 @@ class ClientApplication extends Application {
7979 this . approximateGuildCount ??= null ;
8080 }
8181
82- if ( 'owner' in data ) {
83- this . _owner = this . client . users . _add ( data . owner ) ;
84- } else {
85- this . _owner ??= null ;
86- }
87-
88- if ( 'team' in data ) {
89- /**
90- * The team that holds this application.
91- * @type {?Team }
92- */
93- this . team = new Team ( this . client , data . team ) ;
94- } else {
95- this . team ??= null ;
96- }
97-
9882 if ( 'guild_id' in data ) {
9983 /**
10084 * The id of the guild associated with this application.
@@ -154,15 +138,16 @@ class ClientApplication extends Application {
154138 } else {
155139 this . roleConnectionsVerificationURL ??= null ;
156140 }
157- }
158141
159- /**
160- * The owner of this application.
161- * @type {?(User|Team) }
162- * @readonly
163- */
164- get owner ( ) {
165- return this . team ?? this . _owner ;
142+ /**
143+ * The owner of this OAuth application
144+ * @type {?(User|Team) }
145+ */
146+ this . owner = data . team
147+ ? new Team ( this . client , data . team )
148+ : data . owner
149+ ? this . client . users . _add ( data . owner )
150+ : this . owner ?? null ;
166151 }
167152
168153 /**
Original file line number Diff line number Diff line change @@ -1010,8 +1010,6 @@ export class ClientApplication extends Application {
10101010 public botPublic : boolean | null ;
10111011 public botRequireCodeGrant : boolean | null ;
10121012 public commands : ApplicationCommandManager ;
1013- private _owner : User | null ;
1014- public team : Team | null ;
10151013 public guildId : Snowflake | null ;
10161014 public get guild ( ) : Guild | null ;
10171015 public cover : string | null ;
@@ -1020,7 +1018,7 @@ export class ClientApplication extends Application {
10201018 public tags : string [ ] ;
10211019 public installParams : ClientApplicationInstallParams | null ;
10221020 public customInstallURL : string | null ;
1023- public get owner ( ) : User | Team | null ;
1021+ public owner : User | Team | null ;
10241022 public get partial ( ) : boolean ;
10251023 public roleConnectionsVerificationURL : string | null ;
10261024 public rpcOrigins : string [ ] ;
You can’t perform that action at this time.
0 commit comments