Fixed scripts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js"
|
||||
import fs from "node:fs"
|
||||
import { Command } from "../src/interfaces"
|
||||
import { ICommand } from "../src/interfaces"
|
||||
import env from "../src/utils/Env"
|
||||
const rest = new REST({ version: "10" }).setToken(env.prod.token!)
|
||||
|
||||
@@ -9,11 +9,11 @@ const commandFiles = fs.readdirSync("./src/commands").filter(file => file.endsWi
|
||||
const contentMenuCommands = fs.readdirSync("./src/commands-contextmenu").filter(file => file.endsWith(".ts"))
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const command: Command = require(`../src/commands/${file}`)
|
||||
const command: ICommand = require(`../src/commands/${file}`)
|
||||
commands.push(command.data.toJSON())
|
||||
}
|
||||
for (const file of contentMenuCommands) {
|
||||
const command: Command = require(`../src/commands-contextmenu/${file}`)
|
||||
const command: ICommand = require(`../src/commands-contextmenu/${file}`)
|
||||
commands.push(command.data.toJSON())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user