20 lines
668 B
JavaScript
20 lines
668 B
JavaScript
const path = require("path");
|
|
const { loadAppConfig } = require("../src/config");
|
|
|
|
function main() {
|
|
const configPath = process.env.QUOTE_CONFIG_PATH || path.join(__dirname, "..", "config", "quotes.config.json");
|
|
const config = loadAppConfig(configPath);
|
|
|
|
console.log(
|
|
`Config OK: ${config.users.length} user(s), ${config.allowedSubmitterDiscordIds.length} allowed submitter(s), latest channel ${config.latestChannelId ? "configured" : "not set"}, create-quote channel ${config.createQuoteChannelId ? "configured" : "fallback by name"}.`
|
|
);
|
|
}
|
|
|
|
try {
|
|
main();
|
|
} catch (error) {
|
|
console.error("Config check failed:", error.message);
|
|
process.exit(1);
|
|
}
|
|
|