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

Function sanitizeCounters

src/services/serverstatsService.js:111–119  ·  view source on GitHub ↗
(counters, guildId)

Source from the content-addressed store, hash-verified

109}
110
111function 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
121export async function updateCounter(client, guild, counter) {
122 try {

Callers 2

getServerCountersFunction · 0.85
saveServerCountersFunction · 0.85

Calls 1

normalizeCounterFunction · 0.85

Tested by

no test coverage detected