add more events to log
This commit is contained in:
parent
7335da4dca
commit
0b470e7cf7
1 changed files with 21 additions and 1 deletions
22
src/index.js
22
src/index.js
|
@ -1,5 +1,6 @@
|
|||
const Eris = require("eris");
|
||||
const logger = require("npmlog");
|
||||
logger.level = "verbose";
|
||||
const fs = require("fs");
|
||||
const {resolve} = require("path");
|
||||
|
||||
|
@ -70,7 +71,26 @@ bot.on("ready", async () => {
|
|||
});
|
||||
|
||||
bot.on("error", (err) => {
|
||||
logger.error("hf:main", "Catching error: " + err);
|
||||
logger.error("hf:main", "Catching error: %s", err);
|
||||
});
|
||||
bot.on("warn", (err) => {
|
||||
logger.warn("hf:main", "Catching warn: %s", err);
|
||||
});
|
||||
|
||||
bot.on("shardDisconnect", (err, id) => {
|
||||
logger.verbose("hf:shard", "Disconnecting from shard %s: %s", id, err);
|
||||
});
|
||||
bot.on("shardResume", (id) => {
|
||||
logger.verbose("hf:shard", "Resuming shard %s", id);
|
||||
});
|
||||
bot.on("shardPreReady", (id) => {
|
||||
logger.verbose("hf:shard", "Shard %s getting ready", id);
|
||||
});
|
||||
bot.on("shardReady", (id) => {
|
||||
logger.verbose("hf:shard", "Shard %s ready", id);
|
||||
});
|
||||
bot.on("unknown", (packet, id) => {
|
||||
logger.verbose("hf:main", "Shard %s caught unknown packet: %j", id, packet);
|
||||
});
|
||||
|
||||
bot.connect();
|
||||
|
|
Loading…
Reference in a new issue