refactor(static classes): extend null
This commit is contained in:
parent
8ce04b387d
commit
34d4abf427
2 changed files with 4 additions and 8 deletions
|
@ -16,13 +16,11 @@ const attachmentRegex =
|
||||||
/^(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/;
|
/^(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/;
|
||||||
// scary things above *sigh*
|
// scary things above *sigh*
|
||||||
|
|
||||||
class QueryResolver {
|
class QueryResolver extends null {
|
||||||
/**
|
/**
|
||||||
* Query resolver
|
* Query resolver
|
||||||
*/
|
*/
|
||||||
constructor() {
|
private constructor() {} // eslint-disable-line @typescript-eslint/no-empty-function
|
||||||
throw new Error("Cannot instantiate static class!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves the given search query
|
* Resolves the given search query
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
import { StageChannel, VoiceChannel } from "discord.js";
|
import { StageChannel, VoiceChannel } from "discord.js";
|
||||||
import { TimeData } from "../types/types";
|
import { TimeData } from "../types/types";
|
||||||
|
|
||||||
class Util {
|
class Util extends null {
|
||||||
/**
|
/**
|
||||||
* Utils
|
* Utils
|
||||||
*/
|
*/
|
||||||
constructor() {
|
private constructor() { } // eslint-disable-line @typescript-eslint/no-empty-function
|
||||||
throw new Error("Cannot instantiate static class");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates duration string
|
* Creates duration string
|
||||||
|
|
Loading…
Reference in a new issue