(path, fallback = "#000000")
| 301 | }; |
| 302 | |
| 303 | export 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 | |
| 318 | export async function getGuildBirthdays(client, guildId) { |
| 319 | const key = getGuildBirthdaysKey(guildId); |
no outgoing calls
no test coverage detected