(client, guildId)
| 199 | } |
| 200 | |
| 201 | export async function getCountingGameConfig(client, guildId) { |
| 202 | try { |
| 203 | const rawState = await client.db.get(getStorageKey(guildId)); |
| 204 | return normalizeCountingGame(rawState); |
| 205 | } catch (error) { |
| 206 | logger.error('Failed to load counting game config:', { guildId, error }); |
| 207 | return normalizeCountingGame(); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | export async function saveCountingGameConfig(client, guildId, state) { |
| 212 | const normalized = normalizeCountingGame(state); |
no test coverage detected