|
@@ -144,6 +144,7 @@ export class ViolationPlugin {
|
|
|
}
|
|
|
})
|
|
|
async muteUser({ message }: ICommandData): Promise<void> {
|
|
|
+ await tryDo(message.delete());
|
|
|
const info = await this.parseCommand(message);
|
|
|
if (!info.ok)
|
|
|
return;
|
|
@@ -156,7 +157,6 @@ export class ViolationPlugin {
|
|
|
|
|
|
await this.applyTimedViolation(Mute, info, "mute", handler.start, handler.stop);
|
|
|
await this.sendViolationMessage(message, info, "User has been muted for server violation");
|
|
|
- await tryDo(message.delete());
|
|
|
}
|
|
|
|
|
|
@Command({
|
|
@@ -169,8 +169,8 @@ export class ViolationPlugin {
|
|
|
}
|
|
|
})
|
|
|
async unmuteUser({ message }: ICommandData): Promise<void> {
|
|
|
- await this.removeTimedViolation(Mute, message, "mute");
|
|
|
await tryDo(message.delete());
|
|
|
+ await this.removeTimedViolation(Mute, message, "mute");
|
|
|
}
|
|
|
|
|
|
private getViolationHandler(type: ObjectType<TimedViolation>): TimedViolationStopHandler {
|