From de1c645970d4ca72222eb95febf94233c2ff2a05 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sat, 3 Apr 2021 12:16:18 -0500 Subject: [PATCH] Log errors instead of sending unable to create channel message --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1899f39..22e6500 100644 --- a/index.js +++ b/index.js @@ -136,7 +136,7 @@ async function kulboardCreate(message) { // Add the ID of the "#bot-logs" channel to the database message.reply(`channel ${channel} created!`) collection.updateOne({ guild_id: message.guild.id }, { $set: { "kulboard_id": `${channel.id}` } }); - }).catch(message.reply(`unable to create channel :(`)); + }).catch(message.reply(console.error)); } } else { // Create "#bot-logs" text channel to track message deletes, edits, and channel creations @@ -151,7 +151,7 @@ async function kulboardCreate(message) { // Add the ID of the "#bot-logs" channel to the database message.reply(`channel ${channel} created!`) collection.updateOne({ guild_id: message.guild.id }, { $set: { "kulboard_id": `${channel.id}` } }); - }).catch(message.reply(`unable to create channel :(`)); + }).catch(console.error)); } }); }