MCPcopy Create free account
hub / github.com/codebymitch/TitanBot / normalizeCountingGame

Function normalizeCountingGame

src/services/countingGameService.js:183–195  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

181};
182
183function normalizeCountingGame(state) {
184 const normalized = {
185 ...DEFAULT_COUNTING_GAME,
186 ...(state || {}),
187 };
188
189 normalized.system = COUNTING_SYSTEMS[normalized.system] ? normalized.system : 'decimal';
190 normalized.leaderboard = normalized.leaderboard && typeof normalized.leaderboard === 'object'
191 ? { ...normalized.leaderboard }
192 : {};
193
194 return normalized;
195}
196
197function getStorageKey(guildId) {
198 return `${COUNTING_GAME_KEY_PREFIX}${guildId}`;

Callers 3

getCountingGameConfigFunction · 0.85
saveCountingGameConfigFunction · 0.85
activateCountingGameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected