Moved to zod
This commit is contained in:
@@ -3,7 +3,6 @@ import { YoutubeiExtractor } from "discord-player-youtubei"
|
||||
import { Redis } from "ioredis"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import env from "~/utils/Env.js"
|
||||
import { MissingEnvVarsError } from "./Classes.js"
|
||||
import loadAllEvents from "./Events/loadevents.js"
|
||||
import { log } from "./Logger.js"
|
||||
|
||||
@@ -20,7 +19,6 @@ if (process.env.NODE_ENV === "dev" && process.env.TYPESCRIPT === "true") {
|
||||
|
||||
class Illegitimate {
|
||||
async start() {
|
||||
await this.init()
|
||||
await loadAllEvents(client, ft)
|
||||
// await player.extractors.loadDefault()
|
||||
await player.extractors.loadDefault(ext => ext != "YouTubeExtractor")
|
||||
@@ -36,24 +34,6 @@ class Illegitimate {
|
||||
})
|
||||
}
|
||||
|
||||
private async init() {
|
||||
const prodValues = env.prod
|
||||
const devValues = env.dev
|
||||
|
||||
if (process.env.NODE_ENV === "dev") {
|
||||
for (const [key, value] of Object.entries(devValues)) {
|
||||
if (!value) throw new MissingEnvVarsError(`No ${key} specified`)
|
||||
}
|
||||
for (const [key, value] of Object.entries(prodValues)) {
|
||||
if (!value) throw new MissingEnvVarsError(`No ${key} specified`)
|
||||
}
|
||||
} else {
|
||||
for (const [key, value] of Object.entries(prodValues)) {
|
||||
if (!value) throw new MissingEnvVarsError(`No ${key} specified`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private loadMethods() {
|
||||
String.prototype.removeIndents = function(this: string) {
|
||||
return this.replace(/^ */gm, "")
|
||||
|
||||
Reference in New Issue
Block a user