From eb774aa2804b3905c8f0376b365f82c9d18b2448 Mon Sep 17 00:00:00 2001 From: Vylpes Date: Fri, 30 Jun 2023 17:19:40 +0100 Subject: [PATCH] Fix bot not replying to the interaction on warn (#312) - Fix bot not replying to the interaction when warning a user #301 Co-authored-by: Ethan Lane Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/312 --- src/commands/warn.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/warn.ts b/src/commands/warn.ts index 5044912..618118b 100644 --- a/src/commands/warn.ts +++ b/src/commands/warn.ts @@ -1,4 +1,4 @@ -import { CommandInteraction, EmbedBuilder, GuildMember, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js"; +import { CommandInteraction, EmbedBuilder, PermissionsBitField, SlashCommandBuilder, TextChannel } from "discord.js"; import { AuditType } from "../constants/AuditType"; import EmbedColours from "../constants/EmbedColours"; import Audit from "../database/entities/Audit"; @@ -35,7 +35,6 @@ export default class Warn extends Command { return; } - const targetMember = targetUser.member as GuildMember; const reason = reasonInput && reasonInput.value ? reasonInput.value.toString() : "*none*"; const logEmbed = new EmbedBuilder() @@ -65,5 +64,7 @@ export default class Warn extends Command { const audit = new Audit(targetUser.user.id, AuditType.Warn, reason, interaction.user.id, interaction.guildId); await audit.Save(Audit, audit); + + await interaction.reply('Successfully warned user.'); } } \ No newline at end of file