1.4.0 beta

This commit is contained in:
DJj123dj
2022-05-02 11:07:56 +02:00
parent 5fc3ba3279
commit af8d6351af
53 changed files with 1323 additions and 903 deletions
+23
View File
@@ -0,0 +1,23 @@
const discord = require("discord.js")
const client = require("../../index").client
const config = require("../../config.json")
const getoptions = require("../getoptions")
module.exports = async () => {
const chalk = (await import("chalk")).default
console.log(chalk.red("\nINSTRUCTIONS:\n\n1: Run the command you want to delete in discord.\n2: You get the message 'This command is now deleted!'\n3: There is also a message in the console that says the command is deleted.\n4: reload your discord."))
client.on("interactionCreate",(interaction) => {
if (!interaction.isCommand()) return console.log("this isn't a command!")
interaction.reply({content:"This command is now deleted!"})
try {
client.application.commands.delete(interaction.commandId,interaction.guild.id).then(() => {
console.log("deleted the command",chalk.blue(interaction.commandName),"(id:",interaction.commandId+")")
})
}catch{
console.log(chalk.red("something went wrong by the deleting of this command!"))
}
})
}