From b33668bfb8ebe1d2d91269fdbdb150aab6b663e5 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 24 Apr 2020 22:52:55 -0400 Subject: [PATCH] Alert me about all commands dispatched in DMs --- experiments/skin-database/discord-bot/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/experiments/skin-database/discord-bot/index.js b/experiments/skin-database/discord-bot/index.js index 72e649f6..b5b0852d 100644 --- a/experiments/skin-database/discord-bot/index.js +++ b/experiments/skin-database/discord-bot/index.js @@ -54,7 +54,8 @@ client.on("message", async message => { command, user: message.author.username, args, - channel: message.channel.name || "DM" + channel: message.channel.name || "DM", + alert: message.channel.name == null }); const handler = handlers[command]; if (handler == null) { @@ -69,10 +70,10 @@ client.on("message", async message => { try { await handler(message, args); } catch (e) { - console.error(e); - logger.error("Error handling command", e); + logger.error("Error handling command"); + logger.error(e); message.channel.send( - "Oops. Something went wrong. Ping @captbaritone and yell at him to fix it." + "Oops. Something went wrong. @captbaritone has been DMed a stack trace. Feel free to ping him to fix." ); } });