Fix bot not replying to the interaction on warn (#312)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
- Fix bot not replying to the interaction when warning a user #301 Co-authored-by: Ethan Lane <ethan@vylpes.com> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/312
This commit is contained in:
parent
9749f9c9c9
commit
eb774aa280
1 changed files with 3 additions and 2 deletions
|
@ -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 { AuditType } from "../constants/AuditType";
|
||||||
import EmbedColours from "../constants/EmbedColours";
|
import EmbedColours from "../constants/EmbedColours";
|
||||||
import Audit from "../database/entities/Audit";
|
import Audit from "../database/entities/Audit";
|
||||||
|
@ -35,7 +35,6 @@ export default class Warn extends Command {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const targetMember = targetUser.member as GuildMember;
|
|
||||||
const reason = reasonInput && reasonInput.value ? reasonInput.value.toString() : "*none*";
|
const reason = reasonInput && reasonInput.value ? reasonInput.value.toString() : "*none*";
|
||||||
|
|
||||||
const logEmbed = new EmbedBuilder()
|
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);
|
const audit = new Audit(targetUser.user.id, AuditType.Warn, reason, interaction.user.id, interaction.guildId);
|
||||||
await audit.Save(Audit, audit);
|
await audit.Save(Audit, audit);
|
||||||
|
|
||||||
|
await interaction.reply('Successfully warned user.');
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue