aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/common')
-rw-r--r--src/lib/common/autoMod.ts7
-rw-r--r--src/lib/common/moderation.ts4
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/common/autoMod.ts b/src/lib/common/autoMod.ts
index 2f88ee7..3236253 100644
--- a/src/lib/common/autoMod.ts
+++ b/src/lib/common/autoMod.ts
@@ -207,7 +207,12 @@ export class AutoMod {
ephemeral: true
});
- const result = await interaction.guild?.bushBan({ user: userId, reason, moderator: interaction.user.id });
+ const result = await interaction.guild?.bushBan({
+ user: userId,
+ reason,
+ moderator: interaction.user.id,
+ evidence: (interaction.message as BushMessage).url ?? undefined
+ });
if (result === 'success')
return interaction.reply({
diff --git a/src/lib/common/moderation.ts b/src/lib/common/moderation.ts
index 4af6ec2..c8779fc 100644
--- a/src/lib/common/moderation.ts
+++ b/src/lib/common/moderation.ts
@@ -70,6 +70,7 @@ export class Moderation {
duration?: number;
guild: BushGuildResolvable;
pseudo?: boolean;
+ evidence?: string;
},
getCaseNumber = false
): Promise<{ log: ModLog | null; caseNum: number | null }> {
@@ -96,7 +97,8 @@ export class Moderation {
reason: options.reason,
duration: duration,
guild,
- pseudo: options.pseudo ?? false
+ pseudo: options.pseudo ?? false,
+ evidence: options.evidence
});
const saveResult: ModLog | null = await modLogEntry.save().catch(async (e) => {
await util.handleError('createModLogEntry', e);