aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-13 23:37:57 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-13 23:37:57 -0400
commitb44bbd48c72765e46b904a7aa9ce473ab2e35f98 (patch)
treea63a85c19d656dddbdbc03c4b06728852a2497d7 /src/lib/common
parentad25bed8ac1beb0fee578525b73f39dfa8acf992 (diff)
downloadtanzanite-b44bbd48c72765e46b904a7aa9ce473ab2e35f98.tar.gz
tanzanite-b44bbd48c72765e46b904a7aa9ce473ab2e35f98.tar.bz2
tanzanite-b44bbd48c72765e46b904a7aa9ce473ab2e35f98.zip
automod ban button evidence
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);