const libUtils = require("../libUtils.js"); const discordAuth = require("../utilities/discordAuthorization"); const { SlashCommandBuilder } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('exit') .setDescription('Exit the current application.'), example: "exit", isPrivileged: true, async execute(interaction) { // TODO - Need to add middleware for admins discordAuth.authorizeCommand(interaction, this.data.name, async () => { await interaction.reply( `Goodbye world - Disconnection imminent.` ); libUtils.runAfter(process.exit, 5000); }) } };