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