mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
feat: replace disableEveryone with disableMentions (#3830)
* add ClientOptions#disableMentions and MessageOptions#disableMentions * provide tests * don't sanitize controlled mentions * add @here mentions to tests * fix indents (6 spaces instead of 8) * add Util#cleanContent tests * add typings for removeMentions * replace @ with @\u200b AFTER cleaning content as suggested instead of using removeMentions * better explanation of this option * no newline in Util.removeMentions * fix long line * remove double space * remove comments (change has been reverted) * Use Util.removeMentions to remove mentions * use Util.removeMentions in Util.cleanContent
This commit is contained in:
@@ -21,7 +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 {boolean} [disableEveryone=false] Default value for {@link MessageOptions#disableEveryone}
|
||||
* @property {boolean} [disableMentions=false] 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.
|
||||
@@ -47,7 +47,7 @@ exports.DefaultOptions = {
|
||||
messageCacheLifetime: 0,
|
||||
messageSweepInterval: 0,
|
||||
fetchAllMembers: false,
|
||||
disableEveryone: false,
|
||||
disableMentions: false,
|
||||
partials: [],
|
||||
restWsBridgeTimeout: 5000,
|
||||
disabledEvents: [],
|
||||
|
||||
Reference in New Issue
Block a user