feat(Application): application flags (#5147)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
Jan
2021-03-31 21:55:12 +02:00
committed by GitHub
parent dedf43288e
commit 06e9d86cb3
9 changed files with 147 additions and 53 deletions

View File

@@ -25,21 +25,21 @@ class Application extends Base {
/**
* The name of the app
* @type {string}
* @type {?string}
*/
this.name = data.name;
this.name = data.name ?? this.name ?? null;
/**
* The app's description
* @type {string}
* @type {?string}
*/
this.description = data.description;
this.description = data.description ?? this.description ?? null;
/**
* The app's icon hash
* @type {string}
* @type {?string}
*/
this.icon = data.icon;
this.icon = data.icon ?? this.icon ?? null;
}
/**
@@ -108,7 +108,7 @@ class Application extends Base {
/**
* When concatenated with a string, this automatically returns the application's name instead of the
* Oauth2Application object.
* @returns {string}
* @returns {?string}
* @example
* // Logs: Application name: My App
* console.log(`Application name: ${application}`);