/
die.js
47 lines (43 loc) · 2.06 KB
/
die.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const config = require("../config.json");
let clc = require("cli-color");
let moment = require("moment");
require("moment-timezone");
require("moment-duration-format");
module.exports.run = async (client, message, args, cmdHook, roCMD) => {
if(message.author.id === config.ownerID) {
message.channel.send({embed: {
color: 1069660,
author: {
name: "HolidayBot",
icon_url: client.user.displayAvatarURL
},
title: "Shutting Down...",
footer: {
icon_url: message.author.displayAvatarURL,
text: message.author.username
}
}});
client.destroy();
} else {
console.log("[" + clc.red("FAIL") + "] " + "[" + clc.magenta("PERM") + "] " + `${message.author.tag} (ID: ${message.author.id}) ran "${message}" in "${message.guild.name}" (ID: ${message.guild.id})`);
cmdHook.send("`[" + `${moment().format('DD/MM/YYYY] [HH:mm:ss')}` + "]`" + "[**" + "FAIL" + "**] " + "[**" + "PERM" + "**] " + `__${message.author.tag}__ (ID: ${message.author.id}) ran \`${message}\` in __${message.guild.name}__ (ID: ${message.guild.id})`)
return message.channel.send({embed: {
color: 0xc6373e,
author: {
name: client.user.username,
icon_url: client.user.displayAvatarURL
},
title: "Error!",
description: "You do not have permission to run `die`",
footer: {
icon_url: message.author.displayAvatarURL,
text: message.author.username
}
}});
}
console.log("[" + clc.green("SUCC") + "] " + `${message.author.tag} (ID: ${message.author.id}) ran "${message}" in "${message.guild.name}" (ID: ${message.guild.id})`);
cmdHook.send("`[" + `${moment().format('DD/MM/YYYY] [HH:mm:ss')}` + "]`" + "[**" + "SUCC" + "**] " + `__${message.author.tag}__ (ID: ${message.author.id}) ran \`${message}\` in __${message.guild.name}__ (ID: ${message.guild.id})`)
};
module.exports.help = {
name: "die"
}