Updated deploy commands to use ts files in src
This commit is contained in:
@@ -5,15 +5,15 @@ import env from "../src/utils/Env"
|
||||
const rest = new REST({ version: "10" }).setToken(env.prod.token!)
|
||||
|
||||
const commands: RESTPutAPIApplicationCommandsJSONBody = []
|
||||
const commandFiles = fs.readdirSync("./dist/src/commands").filter(file => file.endsWith(".js"))
|
||||
const contentMenuCommands = fs.readdirSync("./dist/src/commands-contextmenu").filter(file => file.endsWith(".js"))
|
||||
const commandFiles = fs.readdirSync("./src/commands").filter(file => file.endsWith(".ts"))
|
||||
const contentMenuCommands = fs.readdirSync("./src/commands-contextmenu").filter(file => file.endsWith(".ts"))
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const command: Command = require(`../dist/src/commands/${file}`)
|
||||
const command: Command = require(`../src/commands/${file}`)
|
||||
commands.push(command.data.toJSON())
|
||||
}
|
||||
for (const file of contentMenuCommands) {
|
||||
const command: Command = require(`../dist/src/commands-contextmenu/${file}`)
|
||||
const command: Command = require(`../src/commands-contextmenu/${file}`)
|
||||
commands.push(command.data.toJSON())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user