From 025a503abbc97b6e57c2453e7ecf4419322308ea Mon Sep 17 00:00:00 2001 From: powermaker450 Date: Mon, 14 Oct 2024 11:52:04 -0400 Subject: [PATCH] Check if a user is banned from confessions before displaying the modal --- src/commands/confess.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/confess.ts b/src/commands/confess.ts index e1f9b11..ed51cd6 100644 --- a/src/commands/confess.ts +++ b/src/commands/confess.ts @@ -153,7 +153,13 @@ export async function execute(interaction: ChatInputCommandInteraction) { collector.on("collect", i => { if (i.customId === "submitConfession") { - i.showModal(submit); + // Check if the user is banned from confessions first before displaying the modal + dt.isBanned(i.guild.id, i.user.id) + ? i.reply({ + content: "You are banned from confessions in this server!", + ephemeral: true + }) + : i.showModal(submit); } });