wsb-bot / src /commands /shutdown.js
APRK01
Initial commit: WSB Discord Bot
3c7e34b
raw
history blame contribute delete
591 Bytes
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);
},
};