mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user