fix pr0gag trigger

improve error handling
This commit is contained in:
Flummi
2019-08-19 01:55:07 +00:00
parent 21c1f42aeb
commit 1cd1d486de
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ export default async bot => {
}
catch(error) {
e.reply("An error occured.");
logger.error(`${e.network} -> ${e.channel} -> ${e.user.nick}: ${typeof error === "string" ? error : JSON.stringify(error)}`);
logger.error(`${e.network} -> ${e.channel} -> ${e.user.nick}: ${error.toString ? error : JSON.stringify(error)}`);
}
});