mirror of
https://github.com/danbulant/Shasha
synced 2026-05-19 03:58:38 +00:00
log errors to console
This commit is contained in:
parent
d1d6dd6b98
commit
fe2a2e53a4
1 changed files with 21 additions and 5 deletions
26
Main.js
26
Main.js
|
|
@ -198,15 +198,31 @@ client.on("commandRun", async (c, u, msg) => {
|
|||
if (msg.guild && !msg.guild.DB) await msg.guild.dbLoad();
|
||||
});
|
||||
|
||||
client.on("warn", a => console.log("warn", typeof a, a));
|
||||
client.on("error", e => errLog(e, null, client));
|
||||
client.on("warn", e => {
|
||||
console.error(e);
|
||||
errLog(e, null, client);
|
||||
});
|
||||
client.on("error", e => {
|
||||
console.error(e);
|
||||
errLog(e, null, client);
|
||||
});
|
||||
client.on("commandError", (c, e, m) => {
|
||||
console.error(e);
|
||||
errLog(e, m, client);
|
||||
m?.channel.stopTyping();
|
||||
});
|
||||
|
||||
process.on("uncaughtException", e => errLog(e, null, client));
|
||||
process.on("unhandledRejection", e => errLog(e, null, client));
|
||||
process.on("warning", e => errLog(e, null, client));
|
||||
process.on("uncaughtException", e => {
|
||||
console.error(e);
|
||||
errLog(e, null, client);
|
||||
});
|
||||
process.on("unhandledRejection", e => {
|
||||
console.error(e);
|
||||
errLog(e, null, client);
|
||||
});
|
||||
process.on("warning", e => {
|
||||
console.error(e);
|
||||
errLog(e, null, client);
|
||||
});
|
||||
|
||||
client.login(configFile.token);
|
||||
Loading…
Reference in a new issue