Made youtube use searx for results, fall back to dummy db when none is specified, added cluster to stats, more QOL changes
This commit is contained in:
parent
b7a847b612
commit
4cdd59dfcd
8 changed files with 19 additions and 20 deletions
|
@ -1,3 +1,3 @@
|
|||
// wrapper for the database drivers in ./database/
|
||||
|
||||
module.exports = require(`./database/${process.env.DB.split("://")[0]}.js`);
|
||||
module.exports = require(`./database/${process.env.DB ? process.env.DB.split("://")[0] : "dummy"}.js`);
|
|
@ -1,5 +1,8 @@
|
|||
// dummy (no-op) database handler
|
||||
const misc = require("../misc.js");
|
||||
const logger = require("../logger.js");
|
||||
|
||||
logger.warn("Using dummy database adapter. If this isn't what you wanted, check your DB variable.");
|
||||
|
||||
exports.setup = async () => {};
|
||||
exports.stop = async () => {};
|
||||
|
|
|
@ -4,8 +4,6 @@ const logger = require("./logger.js");
|
|||
// load command into memory
|
||||
exports.load = async (command, soundStatus) => {
|
||||
const props = require(`../${command}`);
|
||||
if (props.requires.includes("google") && process.env.GOOGLE === "") return logger.log("warn", `Google info not provided in config, skipped loading command ${command}...`);
|
||||
if (props.requires.includes("cat") && process.env.CAT === "") return logger.log("warn", `Cat API info not provided in config, skipped loading command ${command}...`);
|
||||
if (props.requires.includes("mashape") && process.env.MASHAPE === "") return logger.log("warn", `Mashape/RapidAPI info not provided in config, skipped loading command ${command}...`);
|
||||
if (props.requires.includes("sound") && soundStatus) return logger.log("warn", `Failed to connect to some Lavalink nodes, skipped loading command ${command}...`);
|
||||
const commandArray = command.split("/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue