(counters, guildId)
| 109 | } |
| 110 | |
| 111 | function sanitizeCounters(counters, guildId) { |
| 112 | if (!Array.isArray(counters)) { |
| 113 | return []; |
| 114 | } |
| 115 | |
| 116 | return counters |
| 117 | .filter(isValidCounterShape) |
| 118 | .map(counter => normalizeCounter(counter, guildId)); |
| 119 | } |
| 120 | |
| 121 | export async function updateCounter(client, guild, counter) { |
| 122 | try { |
no test coverage detected