Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bgv2 authored Apr 30, 2024
1 parent 546539d commit fae31b6
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,8 @@ try {
}
configFile = { "help-domain": "quotobot.js.org" };
}
let authorPictures, picturesEnabled;
try {
authorPictures = require("./db/portraits.js");
picturesEnabled = true;
} catch (e) {
if (e.code !== "MODULE_NOT_FOUND") {
throw e;
}
authorPictures = {};
picturesEnabled = false;
console.warn("Warning: No db/portraits.json file was found. Quotes will not have pictures of the author.")
}
const authorPictures = require("./db/portraits.js");
const picturesEnabled = true;

Check warning on line 28 in index.js

View workflow job for this annotation

GitHub Actions / lint (lts/*)

'picturesEnabled' is assigned a value but never used

Check warning on line 28 in index.js

View workflow job for this annotation

GitHub Actions / lint (lts/*)

'picturesEnabled' is assigned a value but never used
let token;
if (configFile.token == "your-token-here-inside-these-quotes") {
token = envVars.QBTOKEN;
Expand Down Expand Up @@ -169,7 +159,6 @@ bot.once("ready", () => {
"server count": bot.guilds.cache.size,
"weather key defined?": (configFile["weather-token"] || envVars.QBWEATHER ? "✅" : "🚫 weather will not work"),
"help link": (configFile.helpURL || "default"),
"author pictures available?": (picturesEnabled ? "✅" : "🚫 author pictures will not be embedded"),
"stocks enabled?": (stocksEnabled ? "✅" : "🚫 stock commands will not work"),
"league enabled?": leagueText
})
Expand Down

0 comments on commit fae31b6

Please sign in to comment.