feat: automod

#8886 djs
This commit is contained in:
March 7th
2022-12-20 22:46:50 +07:00
parent ef2deb64f7
commit 294005bac7
22 changed files with 1191 additions and 4 deletions

View File

@@ -77,6 +77,16 @@ class Sweepers {
return guildCommands + globalCommands;
}
/**
* Sweeps all auto moderation rules and removes the ones which are indicated by the filter.
* @param {Function} filter The function used to determine
* which auto moderation rules will be removed from the caches
* @returns {number} Amount of auto moderation rules that were removed from the caches
*/
sweepAutoModerationRules(filter) {
return this._sweepGuildDirectProp('autoModerationRules', filter).items;
}
/**
* Sweeps all guild bans and removes the ones which are indicated by the filter.
* @param {Function} filter The function used to determine which bans will be removed from the caches.