delete old shit

This commit is contained in:
Erik 2021-06-18 21:31:26 +03:00
parent 18cf9f508c
commit fb20da0124
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

@ -285,41 +285,6 @@ class ModerationManager {
}
// Similar to handleInfraction, but meant for automod, deals with only 1 target
async autoModerate({ guild, action, message, reason, silent, data }) {
const { autoModeration, moderationPoints } = guild._settings;
let points = 0,
expiration = 0,
response = null;
const { force, duration, type } = action;
const Infraction = Constant.Infractions[type];
if (moderationPoints.enabled) {
points = action.points || moderationPoints.points[type];
expiration = action.expiration || moderationPoints.expirations[type];
}
response = await this._handleTarget(Infraction, message.member, {
guild,
channel: message.channel,
executor: guild.me,
arguments: null,
reason,
duration,
data,
force,
silent
});
if (response.error) this.client.logger.debug(`Automod infraction execution failed:\n${JSON.stringify(response)}`);
// TODO:
// Figure out what we want to do with these errors if anything apart from potentially log them
// Most errors here would probably be permission issues/edge cases caused by server configuration/discord perms
}
async _handleArguments(message, targets) {
const actions = {