|
@@ -1,7 +1,7 @@
|
|
import { Plugin, ICommandData, Command, Event, BotEventData } from "src/model/plugin";
|
|
import { Plugin, ICommandData, Command, Event, BotEventData } from "src/model/plugin";
|
|
import { parseArgs, parseDuration, UNIT_MEASURES, isAuthorisedAsync } from "src/util";
|
|
import { parseArgs, parseDuration, UNIT_MEASURES, isAuthorisedAsync } from "src/util";
|
|
import { GuildMember, Guild, MessageEmbed, Message, TextChannel, PartialGuildMember, User } from "discord.js";
|
|
import { GuildMember, Guild, MessageEmbed, Message, TextChannel, PartialGuildMember, User } from "discord.js";
|
|
-import { logger } from "src/logging";
|
|
|
|
|
|
+import { eventLogger, logger } from "src/logging";
|
|
import { client } from "src/client";
|
|
import { client } from "src/client";
|
|
import humanizeDuration from "humanize-duration";
|
|
import humanizeDuration from "humanize-duration";
|
|
import { getRepository, ObjectType, FindConditions, DeepPartial } from "typeorm";
|
|
import { getRepository, ObjectType, FindConditions, DeepPartial } from "typeorm";
|
|
@@ -156,6 +156,9 @@ export class ViolationPlugin {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!info.dryRun) {
|
|
|
|
+ eventLogger.warn("User %s#%s muted user %s#%s for %s because: %s", message.author.username, message.author.discriminator, info.member.user.username, info.member.user.discriminator, info.duration, info.reason);
|
|
|
|
+ }
|
|
await this.applyTimedViolation(Mute, info, "mute", handler.start, handler.stop);
|
|
await this.applyTimedViolation(Mute, info, "mute", handler.start, handler.stop);
|
|
await this.sendViolationMessage(message, info, "User has been muted for server violation");
|
|
await this.sendViolationMessage(message, info, "User has been muted for server violation");
|
|
}
|
|
}
|