Add moderator names to audit reason (#108)

This commit is contained in:
Vylpes 2022-02-05 21:09:35 +00:00 committed by GitHub
parent de236dfd30
commit c8edd1b4c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 551 additions and 12 deletions

View file

@ -67,7 +67,7 @@ export default class Ban extends Command {
const publicEmbed = new PublicEmbed(context, "", `${targetUser} has been banned`);
await targetMember.ban({ reason: reason });
await targetMember.ban({ reason: `Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}` });
logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();

View file

@ -70,7 +70,7 @@ export default class Kick extends Command {
const publicEmbed = new PublicEmbed(context, "", `${targetUser} has been kicked`);
await targetMember.kick(reason);
await targetMember.kick(`Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}`);
logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();

View file

@ -83,7 +83,7 @@ export default class Mute extends Command {
};
}
await targetMember.roles.add(mutedRole, reason);
await targetMember.roles.add(mutedRole, `Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}`);
logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();

View file

@ -74,7 +74,7 @@ export default class Role extends Command {
}
public async AddRole(context: ICommandContext, role: DiscordRole): Promise<ICommandReturnContext> {
await context.message.member?.roles.add(role);
await context.message.member?.roles.add(role, "Toggled with role command");
const embed = new PublicEmbed(context, "", `Gave role: ${role.name}`);
embed.SendToCurrentChannel();
@ -86,7 +86,7 @@ export default class Role extends Command {
}
public async RemoveRole(context: ICommandContext, role: DiscordRole): Promise<ICommandReturnContext> {
await context.message.member?.roles.remove(role);
await context.message.member?.roles.remove(role, "Toggled with role command");
const embed = new PublicEmbed(context, "", `Removed role: ${role.name}`);
embed.SendToCurrentChannel();

View file

@ -83,7 +83,7 @@ export default class Unmute extends Command {
};
}
await targetMember.roles.remove(mutedRole, reason);
await targetMember.roles.remove(mutedRole, `Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}`);
logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();