move command init to constructor
This commit is contained in:
parent
39e4ca69f1
commit
9e923f1657
2
index.ts
2
index.ts
@ -1,6 +1,5 @@
|
|||||||
import express, { Application } from "express"
|
import express, { Application } from "express"
|
||||||
import { config } from "./server/configuration"
|
import { config } from "./server/configuration"
|
||||||
import { commandList } from "./server/constants"
|
|
||||||
import DiscordAdapter from "./server/discordAdapter"
|
import DiscordAdapter from "./server/discordAdapter"
|
||||||
import Routes from "./server/routes"
|
import Routes from "./server/routes"
|
||||||
import Server from "./server/server"
|
import Server from "./server/server"
|
||||||
@ -11,5 +10,4 @@ server.start(() => {
|
|||||||
console.log(`Server running on port ${server.getPort()}`)
|
console.log(`Server running on port ${server.getPort()}`)
|
||||||
new Routes().setRoutes(server.getApp())
|
new Routes().setRoutes(server.getApp())
|
||||||
const discordAdapter = new DiscordAdapter()
|
const discordAdapter = new DiscordAdapter()
|
||||||
discordAdapter.registerCommands(commandList)
|
|
||||||
})
|
})
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"discord-api-types": "^0.24.0",
|
"discord-api-types": "^0.24.0",
|
||||||
"discord.js": "^13.3.1",
|
"discord.js": "^13.3.1",
|
||||||
|
"dotenv": "^10.0.0",
|
||||||
"eslint": "^8.2.0",
|
"eslint": "^8.2.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"jest": "^27.3.1",
|
"jest": "^27.3.1",
|
||||||
|
@ -1606,6 +1606,11 @@ dot-prop@^6.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-obj "^2.0.0"
|
is-obj "^2.0.0"
|
||||||
|
|
||||||
|
dotenv@^10.0.0:
|
||||||
|
version "10.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
|
||||||
|
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
|
||||||
|
|
||||||
duplexer3@^0.1.4:
|
duplexer3@^0.1.4:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||||
|
Loading…
Reference in New Issue
Block a user