Update wrapper.js
This commit is contained in:
parent
8fea463f9a
commit
d5198fc5fc
|
@ -1,18 +1,20 @@
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const Util = require("discordjs-util");
|
const DiscordUtil = require("discordjs-util");
|
||||||
|
|
||||||
const client = new Discord.Client();
|
const client = new Discord.Client();
|
||||||
|
|
||||||
process.on("uncaughtException", (err) => {
|
process.on("uncaughtException", (err) => {
|
||||||
Util.dateError(err);
|
DiscordUtil.dateError("Uncaught exception!", err);
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login(require("./token.json").token);
|
client.login(require("./token.json").token);
|
||||||
|
|
||||||
client.on("ready", () => {
|
client.on("ready", () => {
|
||||||
|
DiscordUtil.dateLog("Registered bot " + client.user.username);
|
||||||
require("./app/index.js")(client);
|
require("./app/index.js")(client);
|
||||||
|
client.user.setGame("benji7425.github.io");
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on("disconnect", eventData => {
|
client.on("disconnect", eventData => {
|
||||||
Util.dateError(eventData.code, eventData.reason);
|
DiscordUtil.dateError("Bot was disconnected!", eventData.code, eventData.reason);
|
||||||
});
|
});
|
Loading…
Reference in a new issue