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

Function getApplicationRoleSettings

src/utils/database.js:1149–1162  ·  view source on GitHub ↗
(client, guildId, roleId)

Source from the content-addressed store, hash-verified

1147}
1148
1149export async function getApplicationRoleSettings(client, guildId, roleId) {
1150 try {
1151 if (!client.db || typeof client.db.get !== "function") {
1152 return { questions: null, logChannelId: null };
1153 }
1154
1155 const key = getApplicationRoleSettingsKey(guildId, roleId);
1156 const settings = await client.db.get(key, {});
1157 return unwrapReplitData(settings) || { questions: null, logChannelId: null };
1158 } catch (error) {
1159 logger.error(`Error getting application role settings for ${guildId}:${roleId}:`, error);
1160 return { questions: null, logChannelId: null };
1161 }
1162}
1163
1164export async function saveApplicationRoleSettings(client, guildId, roleId, settings) {
1165 try {

Callers 5

handleApplicationModalFunction · 0.90
handleSubmitFunction · 0.90
showApplicationDashboardFunction · 0.90
handleLogChannelFunction · 0.90
handleQuestionsFunction · 0.90

Calls 3

unwrapReplitDataFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected