feat: reimplement disableEveryone into disableMentions

* User input sanitation: reimplement disableEveryone into disableMentions

* Change default value of ClientOptions#disableMentions to 'none'

* Update type declarations of disableMentions to include default

* update for compliance with ESLint

* Overlooked these files. Updated for complete compliance with ESLint
This commit is contained in:
Papa
2020-02-29 06:20:39 -07:00
committed by GitHub
parent bbe169deac
commit 9c8aaf1bbc
8 changed files with 51 additions and 29 deletions

View File

@@ -21,7 +21,8 @@ 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} [disableMentions=false] Default value for {@link MessageOptions#disableMentions}
* @property {'none' | 'all' | 'everyone'} [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.
@@ -47,7 +48,7 @@ exports.DefaultOptions = {
messageCacheLifetime: 0,
messageSweepInterval: 0,
fetchAllMembers: false,
disableMentions: false,
disableMentions: 'none',
partials: [],
restWsBridgeTimeout: 5000,
disabledEvents: [],