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

Function validateGuildId

src/services/reactionRoleService.js:18–27  ·  view source on GitHub ↗
(guildId)

Source from the content-addressed store, hash-verified

16];
17
18function 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
29function validateMessageId(messageId) {
30 if (!messageId || typeof messageId !== 'string' || !/^\d{17,19}$/.test(messageId)) {

Callers 7

getReactionRoleMessageFunction · 0.85
addReactionRoleFunction · 0.85
removeReactionRoleFunction · 0.85
setReactionRoleChannelFunction · 0.85

Calls 1

createErrorFunction · 0.90

Tested by

no test coverage detected