mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
feat(Message): add messageEditHistoryMaxSize to limit stored msg edits (#4867)
This commit is contained in:
committed by
GitHub
parent
4a6fb9a7d4
commit
c412cd7521
@@ -432,6 +432,13 @@ class Client extends BaseClient {
|
||||
if (typeof options.messageSweepInterval !== 'number' || isNaN(options.messageSweepInterval)) {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'messageSweepInterval', 'a number');
|
||||
}
|
||||
if (
|
||||
typeof options.messageEditHistoryMaxSize !== 'number' ||
|
||||
isNaN(options.messageEditHistoryMaxSize) ||
|
||||
options.messageEditHistoryMaxSize < -1
|
||||
) {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'messageEditHistoryMaxSize', 'a number greater than or equal to -1');
|
||||
}
|
||||
if (typeof options.fetchAllMembers !== 'boolean') {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'fetchAllMembers', 'a boolean');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user