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

Function saveApplicationRoles

src/utils/database.js:917–931  ·  view source on GitHub ↗
(client, guildId, roles)

Source from the content-addressed store, hash-verified

915}
916
917export async function saveApplicationRoles(client, guildId, roles) {
918 try {
919 if (!client.db || typeof client.db.set !== "function") {
920 logger.error("Database client is not available for saveApplicationRoles.");
921 return false;
922 }
923
924 const key = getApplicationRolesKey(guildId);
925 await client.db.set(key, roles);
926 return true;
927 } catch (error) {
928 logger.error(`Error saving application roles for guild ${guildId}:`, error);
929 return false;
930 }
931}
932
933export function getApplicationSettingsKey(guildId) {
934 return `guild:${guildId}:applications:settings`;

Callers 6

handleSetupFunction · 0.90
setupCollectorsFunction · 0.90
handleRoleAddFunction · 0.90
handleRoleRemoveFunction · 0.90
handleDeleteApplicationFunction · 0.90

Calls 2

getApplicationRolesKeyFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected