mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
Documentation improvements (#2069)
* docs: fix documentation in various places All stores: resolveID returns a nullable Snowflake GuildAuditLogs: ActionType also can be ALL MessageEmbed: make files property show up in the docs ClientApplication: resetSecret and resetToken return a promise ClientManager: status is readonly Guild: features is an array of strings and ban no longer accepts a number or string Guild: ban method no longer accepts a string or number GuildMember: ^ RichPresenceAssets: small and large Image are Snowflakes, also fixed parameter documentation for small and large image url method WebhookMessageOptions: file property is no longer a thing * docs: improve GuildAuditLogs documentation Prefix types with AuditLog to avoid confusion Document GuildAuditLogs' static Targets and Actions properties and add necessary typedefs Use typdefs over primitives where possible. * fix documentation for Guild#defaultRole
This commit is contained in:
@@ -160,21 +160,22 @@ class RichPresenceAssets {
|
||||
|
||||
/**
|
||||
* ID of the large image asset
|
||||
* @type {?string}
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.largeImage = assets.large_image || null;
|
||||
|
||||
/**
|
||||
* ID of the small image asset
|
||||
* @type {?string}
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.smallImage = assets.small_image || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL of the small image asset
|
||||
* @param {string} format Format of the image
|
||||
* @param {number} size Size of the image
|
||||
* @param {Object} [options] Options for the image url
|
||||
* @param {string} [options.format] Format of the image
|
||||
* @param {number} [options.size] Size of the image
|
||||
* @returns {?string} The small image URL
|
||||
*/
|
||||
smallImageURL({ format, size } = {}) {
|
||||
@@ -185,8 +186,9 @@ class RichPresenceAssets {
|
||||
|
||||
/**
|
||||
* Gets the URL of the large image asset
|
||||
* @param {string} format Format of the image
|
||||
* @param {number} size Size of the image
|
||||
* @param {Object} [options] Options for the image url
|
||||
* @param {string} [options.format] Format of the image
|
||||
* @param {number} [options.size] Size of the image
|
||||
* @returns {?string} The large image URL
|
||||
*/
|
||||
largeImageURL({ format, size } = {}) {
|
||||
|
||||
Reference in New Issue
Block a user