mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
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:
@@ -386,8 +386,8 @@ class Client extends BaseClient {
|
||||
if (typeof options.fetchAllMembers !== 'boolean') {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'fetchAllMembers', 'a boolean');
|
||||
}
|
||||
if (typeof options.disableMentions !== 'boolean') {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'disableMentions', 'a boolean');
|
||||
if (typeof options.disableMentions !== 'string') {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'disableMentions', 'a string');
|
||||
}
|
||||
if (!Array.isArray(options.partials)) {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'partials', 'an Array');
|
||||
|
||||
Reference in New Issue
Block a user