Skip to content

Commit

Permalink
Update: Some small little changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Wood committed Oct 8, 2024
1 parent 4cc12e7 commit 24a1ddd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/slashCommands/moderation/clear.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { MessageEmbed } = require("discord.js");
const Logging = require("../../database/schemas/logging.js");
const logger = require("../../utils/logger.js");

module.exports = {
data: new SlashCommandBuilder()
Expand Down Expand Up @@ -64,10 +63,8 @@ module.exports = {
try {
const deletedMessages = await channel.bulkDelete(messagesToDelete, true);
totalDeleted += deletedMessages.size;
logger.info(`Deleted ${deletedMessages.size} ${deletedMessages.size === 1 ? "message" : "messages"}.`, { label: "Purge" });
} catch (error) {
logger.info(`Error deleting messages: ${error}`, { label: "ERROR" });
return interaction.editReply({ content: "There was an error trying to delete messages in this channel.", ephemeral: true });
}
}

Expand Down

0 comments on commit 24a1ddd

Please sign in to comment.