| const { createEmbed } = require('../utils/embeds'); | |
| const { Colors } = require('../config'); | |
| const { db } = require('../database'); | |
| module.exports = { | |
| name: 'shutdown bot', | |
| async execute(client, message) { | |
| const embed = createEmbed({ | |
| title: 'π Shutting Down', | |
| description: 'WSB is going offline. Goodbye!', | |
| color: Colors.ACCENT, | |
| }); | |
| await message.reply({ embeds: [embed] }); | |
| // Close database | |
| db.close(); | |
| // Destroy client and exit | |
| client.destroy(); | |
| process.exit(0); | |
| }, | |
| }; | |