docs: general cleanup and improvements (#6299)

Co-authored-by: DaStormer <40336269+DaStormer@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Rodry
2021-08-05 20:34:06 +01:00
committed by GitHub
parent 4241febe24
commit b4afcf8236
39 changed files with 203 additions and 136 deletions

View File

@@ -187,11 +187,16 @@ class Activity {
this.applicationId = data.application_id ?? null;
/**
* Timestamps for the activity
* @type {?Object}
* Represents timestamps of an activity
* @typedef {Object} ActivityTimestamps
* @property {?Date} start When the activity started
* @property {?Date} end When the activity will end
*/
/**
* Timestamps for the activity
* @type {?ActivityTimestamps}
*/
this.timestamps = data.timestamps
? {
start: data.timestamps.start ? new Date(Number(data.timestamps.start)) : null,
@@ -212,11 +217,16 @@ class Activity {
this.platform = data.platform ?? null;
/**
* Party of the activity
* @type {?Object}
* Represents a party of an activity
* @typedef {Object} ActivityParty
* @property {?string} id The party's id
* @property {number[]} size Size of the party as `[current, max]`
*/
/**
* Party of the activity
* @type {?ActivityParty}
*/
this.party = data.party ?? null;
/**
@@ -330,7 +340,7 @@ class RichPresenceAssets {
/**
* Gets the URL of the small image asset
* @param {StaticImageURLOptions} [options] Options for the image url
* @returns {?string} The small image URL
* @returns {?string}
*/
smallImageURL({ format, size } = {}) {
return (
@@ -345,7 +355,7 @@ class RichPresenceAssets {
/**
* Gets the URL of the large image asset
* @param {StaticImageURLOptions} [options] Options for the image url
* @returns {?string} The large image URL
* @returns {?string}
*/
largeImageURL({ format, size } = {}) {
if (!this.largeImage) return null;