mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs(MessageMentionTypes): move possible values to description (#3990)
* docs(MessageMentionTypes): correct type * docs(MessageMentionTypes): change role to roles * docs(MessageMentionOptions): correct description to allow usage as an array * remove unneeded part of description Co-Authored-By: Ryan Munro <rsm999@uowmail.edu.au> * docs: add DisableMentionType to remove literal string types Co-authored-by: Ryan Munro <rsm999@uowmail.edu.au>
This commit is contained in:
@@ -86,8 +86,8 @@ class Webhook {
|
||||
* @property {Object[]} [embeds] An array of embeds for the message
|
||||
* @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
|
||||
* (see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)
|
||||
* @property {'none' | 'all' | 'everyone'} [disableMentions=this.client.options.disableMentions] Whether or not
|
||||
* all mentions or everyone/here mentions should be sanitized to prevent unexpected mentions
|
||||
* @property {DisableMentionType} [disableMentions=this.client.options.disableMentions] Whether or not all mentions or
|
||||
* everyone/here mentions should be sanitized to prevent unexpected mentions
|
||||
* @property {FileOptions[]|string[]} [files] Files to send with the message
|
||||
* @property {string|boolean} [code] Language for optional codeblock formatting to apply
|
||||
* @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if
|
||||
|
||||
@@ -59,8 +59,8 @@ class TextBasedChannel {
|
||||
* @property {MessageEmbed|Object} [embed] An embed for the message
|
||||
* (see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)
|
||||
* @property {MessageMentionOptions} [allowedMentions] Which mentions should be parsed from the message content
|
||||
* @property {'none' | 'all' | 'everyone'} [disableMentions=this.client.options.disableMentions] Whether or not
|
||||
* all mentions or everyone/here mentions should be sanitized to prevent unexpected mentions
|
||||
* @property {DisableMentionType} [disableMentions=this.client.options.disableMentions] Whether or not all mentions or
|
||||
* everyone/here mentions should be sanitized to prevent unexpected mentions
|
||||
* @property {FileOptions[]|BufferResolvable[]} [files] Files to send with the message
|
||||
* @property {string|boolean} [code] Language for optional codeblock formatting to apply
|
||||
* @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if
|
||||
@@ -77,8 +77,19 @@ class TextBasedChannel {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Types of mentions to enable in MessageMentionOptions
|
||||
* @typedef {'role' | 'users' | 'everyone'} MessageMentionTypes
|
||||
* Types of mentions to enable in MessageMentionOptions.
|
||||
* - `roles`
|
||||
* - `users`
|
||||
* - `everyone`
|
||||
* @typedef {string} MessageMentionTypes
|
||||
*/
|
||||
|
||||
/**
|
||||
* The type of mentions to disable.
|
||||
* - `none`
|
||||
* - `all`
|
||||
* - `everyone`
|
||||
* @typedef {string} DisableMentionType
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,8 +21,7 @@ const browser = (exports.browser = typeof window !== 'undefined');
|
||||
* the message cache lifetime (in seconds, 0 for never)
|
||||
* @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup, as well as
|
||||
* upon joining a guild (should be avoided whenever possible)
|
||||
* @property {'none' | 'all' | 'everyone'} [disableMentions='none'] Default value
|
||||
* for {@link MessageOptions#disableMentions}
|
||||
* @property {DisableMentionType} [disableMentions='none'] Default value for {@link MessageOptions#disableMentions}
|
||||
* @property {PartialType[]} [partials] Structures allowed to be partial. This means events can be emitted even when
|
||||
* they're missing all the data for a particular structure. See the "Partials" topic listed in the sidebar for some
|
||||
* important usage information, as partials require you to put checks in place when handling data.
|
||||
|
||||
Reference in New Issue
Block a user