From 3e08fa5afdae88b3770fd5d2548c11eac6723b42 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Wed, 22 Jun 2022 11:07:27 -0600 Subject: [PATCH] plant: log errors to log --- src/modules/utsuholights.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/utsuholights.js b/src/modules/utsuholights.js index 1aa16d9..14a685e 100644 --- a/src/modules/utsuholights.js +++ b/src/modules/utsuholights.js @@ -4,6 +4,8 @@ const CATEGORY = "misc"; const fetch = require("node-fetch"); const {tinycolor} = require("@ctrl/tinycolor"); +const logger = require("./logger.js"); + // taken from rot13.com function rot(s, i) { return s.replace(/[a-zA-Z]/g, function (c) { @@ -95,6 +97,7 @@ plant.callback = async function () { try { return {file: {file: await fetchPlant(), name: "plant.jpg"}}; } catch (err) { + logger.error("hf:cmd:plant", err); return "<:trollhollow:851301241417498704> where plant (Encountered an error getting plant cam)"; } };