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

Function getWelcomeConfig

src/utils/database.js:680–695  ·  view source on GitHub ↗
(client, guildId)

Source from the content-addressed store, hash-verified

678}
679
680export async function getWelcomeConfig(client, guildId) {
681 if (!client.db) {
682 logger.warn('Database not available for getWelcomeConfig');
683 return normalizeWelcomeConfig();
684 }
685
686 const key = getWelcomeConfigKey(guildId);
687 try {
688 const config = await client.db.get(key, {});
689 const unwrapped = unwrapReplitData(config);
690 return normalizeWelcomeConfig(unwrapped);
691 } catch (error) {
692 logger.error(`Error getting welcome config for guild ${guildId}:`, error);
693 return normalizeWelcomeConfig();
694 }
695}
696
697export async function saveWelcomeConfig(client, guildId, config) {
698 const key = getWelcomeConfigKey(guildId);

Callers 14

executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
handleSetupFunction · 0.90
handleSetupFunction · 0.90
refreshDashboardFunction · 0.90
executeFunction · 0.90
refreshDashboardFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90
executeFunction · 0.90

Calls 4

normalizeWelcomeConfigFunction · 0.85
getWelcomeConfigKeyFunction · 0.85
unwrapReplitDataFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected