(guildId)
| 16 | ]; |
| 17 | |
| 18 | function validateGuildId(guildId) { |
| 19 | if (!guildId || typeof guildId !== 'string' || !/^\d{17,19}$/.test(guildId)) { |
| 20 | throw createError( |
| 21 | `Invalid guild ID: ${guildId}`, |
| 22 | ErrorTypes.VALIDATION, |
| 23 | 'Invalid server ID provided.', |
| 24 | { guildId } |
| 25 | ); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | function validateMessageId(messageId) { |
| 30 | if (!messageId || typeof messageId !== 'string' || !/^\d{17,19}$/.test(messageId)) { |
no test coverage detected