Code refactror
This commit is contained in:
@@ -5,7 +5,7 @@ import path = require("path")
|
||||
import fs = require("fs")
|
||||
import { FileType } from "../../typings"
|
||||
|
||||
function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
const cmdPath = path.join(__dirname, "..", "..", "commands")
|
||||
const cmdFiles = fs .readdirSync(cmdPath) .filter(file => file.endsWith(ft))
|
||||
|
||||
@@ -45,6 +45,4 @@ function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export { loadSlashCommandsEvents }
|
||||
}
|
||||
Reference in New Issue
Block a user