plant: log errors to log
This commit is contained in:
parent
76ee7a789b
commit
3e08fa5afd
1 changed files with 3 additions and 0 deletions
|
@ -4,6 +4,8 @@ const CATEGORY = "misc";
|
||||||
const fetch = require("node-fetch");
|
const fetch = require("node-fetch");
|
||||||
const {tinycolor} = require("@ctrl/tinycolor");
|
const {tinycolor} = require("@ctrl/tinycolor");
|
||||||
|
|
||||||
|
const logger = require("./logger.js");
|
||||||
|
|
||||||
// taken from rot13.com
|
// taken from rot13.com
|
||||||
function rot(s, i) {
|
function rot(s, i) {
|
||||||
return s.replace(/[a-zA-Z]/g, function (c) {
|
return s.replace(/[a-zA-Z]/g, function (c) {
|
||||||
|
@ -95,6 +97,7 @@ plant.callback = async function () {
|
||||||
try {
|
try {
|
||||||
return {file: {file: await fetchPlant(), name: "plant.jpg"}};
|
return {file: {file: await fetchPlant(), name: "plant.jpg"}};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
logger.error("hf:cmd:plant", err);
|
||||||
return "<:trollhollow:851301241417498704> where plant (Encountered an error getting plant cam)";
|
return "<:trollhollow:851301241417498704> where plant (Encountered an error getting plant cam)";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue