17 lines
550 B
JavaScript
17 lines
550 B
JavaScript
var libUtils = require("../libUtils.js");
|
|
|
|
module.exports = {
|
|
name: 'exit',
|
|
description: 'Exit the current application.',
|
|
example: "exit",
|
|
isPrivileged: true,
|
|
async execute(message) {
|
|
// TODO - Need to add middleware for admins
|
|
if (message.member.user.tag !== "Logan#3331") message.reply(`Sorry ${message.member.user.tag}, you are not allowed to use this command.`);
|
|
message.reply(
|
|
`Goodbye world - Disconnection imminent.`
|
|
);
|
|
await libUtils.sleep(5000);
|
|
await new Promise(resolve => setTimeout(process.exit(), 5000));
|
|
}
|
|
}; |