chore(bot): fixed remaining issues

This commit is contained in:
Ahmad 2025-04-17 01:24:52 -04:00
parent 7c2a99daf5
commit 77c4b75440
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
5 changed files with 29 additions and 17 deletions

View file

@ -22,7 +22,7 @@ const command: OptionsCommand = {
execute: async (interaction) => {
if (!interaction.isChatInputCommand() || !interaction.guild) return;
interaction.deferReply({ flags: ['Ephemeral'] });
await interaction.deferReply({ flags: ['Ephemeral'] });
try {
const userId = interaction.options.get('userid')?.value as string;
@ -38,6 +38,7 @@ const command: OptionsCommand = {
});
return;
}
try {
const ban = await interaction.guild.bans.fetch(userId);
if (!ban) {
@ -64,7 +65,7 @@ const command: OptionsCommand = {
content: `<@${userId}> has been unbanned. Reason: ${reason}`,
});
} catch (error) {
console.error(error);
console.error(`Unable to unban user: ${error}`);
await interaction.editReply({
content: 'Unable to unban user.',
});