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

Function isValidCounterShape

src/services/serverstatsService.js:82–92  ·  view source on GitHub ↗
(counter)

Source from the content-addressed store, hash-verified

80}
81
82function isValidCounterShape(counter) {
83 return Boolean(
84 counter &&
85 typeof counter === 'object' &&
86 typeof counter.id === 'string' &&
87 counter.id.length > 0 &&
88 typeof counter.type === 'string' &&
89 typeof counter.channelId === 'string' &&
90 counter.channelId.length > 0
91 );
92}
93
94function normalizeCounter(counter, guildId) {
95 const normalized = {

Callers 1

getServerCountersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected