MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / getColor

Function getColor

src/utils/database.js:303–316  ·  view source on GitHub ↗
(path, fallback = "#000000")

Source from the content-addressed store, hash-verified

301};
302
303export const getColor = (path, fallback = "#000000") => {
304 const parts = path.split(".");
305 let current = BotConfig.embeds.colors;
306
307 for (const part of parts) {
308 if (current[part] === undefined) {
309 logger.warn(`Color path '${path}' not found in config, using fallback`);
310 return fallback;
311 }
312 current = current[part];
313 }
314
315 return typeof current === "string" ? current : fallback;
316};
317
318export async function getGuildBirthdays(client, guildId) {
319 const key = getGuildBirthdaysKey(guildId);

Callers 2

createEmbedFunction · 0.90
normalizeWelcomeConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected