Code refactror
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user