Add moderator names to audit reason (#108)
This commit is contained in:
parent
de236dfd30
commit
c8edd1b4c5
10 changed files with 551 additions and 12 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue