(counter)
| 80 | } |
| 81 | |
| 82 | function 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 | |
| 94 | function normalizeCounter(counter, guildId) { |
| 95 | const normalized = { |