mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +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:
@@ -95,7 +95,7 @@ class ChannelStore extends DataStore {
|
||||
* @memberof ChannelStore
|
||||
* @instance
|
||||
* @param {ChannelResolvable} channel The channel resolvable to resolve
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class DataStore extends Collection {
|
||||
/**
|
||||
* Resolves a data entry to a instance ID.
|
||||
* @param {string|Instance} idOrInstance The id or instance of something in this DataStore
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
resolveID(idOrInstance) {
|
||||
if (idOrInstance instanceof this.holds) return idOrInstance.id;
|
||||
|
||||
@@ -38,7 +38,7 @@ class EmojiStore extends DataStore {
|
||||
/**
|
||||
* Resolves a EmojiResolvable to a Emoji ID string.
|
||||
* @param {EmojiResolvable} emoji The Emoji resolvable to identify
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
resolveID(emoji) {
|
||||
if (emoji instanceof ReactionEmoji) return emoji.id;
|
||||
|
||||
@@ -42,7 +42,7 @@ class GuildChannelStore extends DataStore {
|
||||
* @memberof GuildChannelStore
|
||||
* @instance
|
||||
* @param {GuildChannelResolvable} channel The GuildChannel resolvable to resolve
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class GuildMemberStore extends DataStore {
|
||||
/**
|
||||
* Resolves a GuildMemberResolvable to an member ID string.
|
||||
* @param {GuildMemberResolvable} member The user that is part of the guild
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
resolveID(member) {
|
||||
const memberResolveable = super.resolveID(member);
|
||||
|
||||
@@ -33,7 +33,7 @@ class GuildStore extends DataStore {
|
||||
* @memberof GuildStore
|
||||
* @instance
|
||||
* @param {GuildResolvable} guild The guild resolvable to identify
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ class MessageStore extends DataStore {
|
||||
* @memberof MessageStore
|
||||
* @instance
|
||||
* @param {MessageResolvable} message The message resolvable to resolve
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class PresenceStore extends DataStore {
|
||||
/**
|
||||
* Resolves a PresenceResolvable to a Presence ID string.
|
||||
* @param {PresenceResolvable} presence The presence resolvable to resolve
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
resolveID(presence) {
|
||||
const presenceResolveable = super.resolveID(presence);
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReactionStore extends DataStore {
|
||||
* @memberof ReactionStore
|
||||
* @instance
|
||||
* @param {MessageReactionResolvable} role The role resolvable to resolve
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class RoleStore extends DataStore {
|
||||
* @memberof RoleStore
|
||||
* @instance
|
||||
* @param {RoleResolvable} role The role resolvable to resolve
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class UserStore extends DataStore {
|
||||
/**
|
||||
* Resolves a UserResolvable to a user ID string.
|
||||
* @param {UserResolvable} user The UserResolvable to identify
|
||||
* @returns {?string}
|
||||
* @returns {?Snowflake}
|
||||
*/
|
||||
resolveID(user) {
|
||||
if (user instanceof GuildMember) return user.user.id;
|
||||
|
||||
Reference in New Issue
Block a user