(limit)
| 91 | } |
| 92 | |
| 93 | export 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 | |
| 115 | export function formatChannelName(template, variables) { |
| 116 | try { |
no outgoing calls
no test coverage detected