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

Function validateUserLimit

src/services/joinToCreateService.js:93–113  ·  view source on GitHub ↗
(limit)

Source from the content-addressed store, hash-verified

91}
92
93export function validateUserLimit(limit) {
94 const limitNum = parseInt(limit);
95
96 if (isNaN(limitNum)) {
97 throw new TitanBotError(
98 'User limit must be a valid number',
99 ErrorTypes.VALIDATION,
100 'Please enter a valid number for user limit.'
101 );
102 }
103
104 if (limitNum < 0 || limitNum > 99) {
105 throw new TitanBotError(
106 'User limit out of valid range',
107 ErrorTypes.VALIDATION,
108 'User limit must be between 0 (no limit) and 99.'
109 );
110 }
111
112 return true;
113}
114
115export function formatChannelName(template, variables) {
116 try {

Callers 3

initializeJoinToCreateFunction · 0.85
updateChannelConfigFunction · 0.85
createTemporaryChannelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected