Initial Commit

This commit is contained in:
Shinuwa 2026-06-28 22:44:04 +02:00
commit 6d2e379a0c
41 changed files with 5064 additions and 0 deletions

View file

@ -0,0 +1,31 @@
import { SlashCommandBuilder } from "discord.js";
const command = {
data: new SlashCommandBuilder()
.setName("deletemsgs")
.setDescription("Supprime tous les messages, sauf ceux épinglés"),
async execute(interaction) {
let textChannel = interaction.client.channels.cache.get(
interaction.channelId
);
textChannel.messages
.fetch({ limit: 100 })
.then((fetched) => {
const notPinned = fetched.filter((fetchedMsg) => !fetchedMsg.pinned);
textChannel.bulkDelete(notPinned, true);
console.log(
`[${new Date().toLocaleString()}] Command : Delete Messages used`
);
})
.catch(console.error);
interaction.reply("Et voila, c'est tout propre ! 🐱").then(() => {
setTimeout(() => {
interaction.deleteReply();
}, 7000);
});
},
};
export { command };