Add files via upload

This commit is contained in:
2022-11-22 19:53:50 +01:00
committed by GitHub
parent e4415f9180
commit 553fcd87cf
12 changed files with 750 additions and 0 deletions

32
Commands/clear.js Normal file
View File

@ -0,0 +1,32 @@
const { EmbedBuilder, SlashCommandBuilder, PermissionFlagsBits } = require('discord.js');
module.exports = {
name: "clear",
description: "Bulkdeletes a set Amount of Messages",
options: [],
CommandCreator() {
const data = new SlashCommandBuilder()
.setName(this.name)
.setDescription(this.description)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
.addIntegerOption(option => option.setName("amount").setDescription("the amount of messages to remove").setMinValue(1).setRequired(true));
return data.toJSON();
},
async run(bot, interaction) {
interaction.channel.bulkDelete(interaction.options.getInteger("amount"))
.then(interaction.channel.send(`Ich habe ${interaction.options.getInteger("amount")} Nachrichten gelöscht!`)
.then(msg => {
setTimeout(() => {
msg.delete();
},5000)
})
)
.catch(err => {
console.log(err)
return
});
},
}