require("dotenv").config(); const { EmbedBuilder, REST, Routes } = require('discord.js'); ownerList = [ '213966480621043712' ]; const rest = new REST().setToken(process.env.TOKEN); // module.exports = { // name: "deleteslashcommands", // private: true, // description: "Deregister guild slash commands", // run: async (client, interaction) => { // if (ownerList.includes(interaction.user.id)) { // rest.put(Routes.applicationGuildCommands(client.user.id, interaction.guild.id), { body: [] }) // .then(() => { // console.log(`Successfully deleted all guild commands of guild ${interaction.guild.id}.`) // const embed = new EmbedBuilder() // .setColor("#FF0000") // .setTitle("Slash commands deleted successfully") // .setDescription(`Guild slash commands deleted successfully`) // .setTimestamp() // .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` }); // interaction.followUp({ embeds: [embed] }); // }) // .catch((err) => { // interaction.followUp({ content: 'Something went wrong'}); // console.log(err); // }); // } else { // const embed = new EmbedBuilder() // .setColor("#FF0000") // .setTitle("🐺 no perms") // .setDescription(`You have no perms to do this.`) // .setTimestamp() // .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` }); // interaction.followUp({ embeds: [embed] }); // } // }, // };