We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b05ae1 commit c360caeCopy full SHA for c360cae
src/Private/RequestHandler.ts
@@ -12,15 +12,7 @@ class RequestHandler {
12
}
13
14
setBaseURL(url: string = 'https://api.hypixel.net/v2'): this {
15
- if (
16
- !url.startsWith('http') ||
17
- !url.includes('://') ||
18
- (url.includes('.') && url.includes(':')) ||
19
- (!url.includes('.') && !url.includes(':'))
20
- ) {
21
- throw new Error(Errors.INVALID_BASE_URL);
22
- }
23
-
+ if (!url.startsWith('http') || !url.includes('://')) throw new Error(Errors.INVALID_BASE_URL);
24
if (url.endsWith('/')) throw new Error(Errors.INVALID_BASE_URL_SLASH);
25
this.BASE_URL = url;
26
return this;
0 commit comments