Code refactror

This commit is contained in:
2023-12-30 16:53:44 +01:00
parent a4d96dd63d
commit 474a537797
21 changed files with 81 additions and 80 deletions

View File

@@ -4,7 +4,7 @@ import { ContextMenu } from "../interfaces"
import { Button } from "../interfaces"
import { Modal } from "../interfaces"
import { Autocomplete } from "../interfaces"
import config from "./Config"
import env from "./Env"
import { autoDeployCommands } from "./Autodeploy"
import { loadAllEvents } from "./Events"
@@ -40,17 +40,17 @@ export class ExtendedClient extends Client {
if (process.env.NODE_ENV === "dev" && process.env.TYPESCRIPT) {
console.log("Running in development mode. [ts-node]")
loadAllEvents(this, "ts")
token = config.dev.devtoken!
token = env.dev.devtoken!
autoDeployCommands("ts")
} else if (process.env.NODE_ENV === "dev" && !process.env.TYPESCRIPT) {
console.log("Running in development mode.")
loadAllEvents(this, "js")
token = config.dev.devtoken!
token = env.dev.devtoken!
autoDeployCommands("js")
} else {
console.log("Running in production mode.")
loadAllEvents(this, "js")
token = config.prod.token!
token = env.prod.token!
}
this.login(token)