Skip to content

Commit

Permalink
autofill reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Szedann committed Jan 22, 2024
1 parent fc7c9a2 commit 178a3a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/webserver/banshare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ const banButton = new Button(
});
}

const reason =
'Simulated Ban share: ' +
(interaction.message.embeds[0].fields[4].value ??
'no reason provided');

const modal = banModal.modal(
{
title: `Ban ${user.username}`,
Expand All @@ -103,6 +108,7 @@ const banButton = new Button(
.setCustomId('banReason')
.setLabel('Ban reason')
.setStyle(TextInputStyle.Paragraph)
.setValue(reason)
),
],
},
Expand Down

0 comments on commit 178a3a4

Please sign in to comment.