mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-25 04:01:02 +00:00
feat(bots/discord/utils): allow loading commands from custom dir
This commit is contained in:
@@ -4,6 +4,7 @@ import { createLogger } from '@revanced/bot-shared'
|
||||
import { ActivityType, Client as DiscordClient, Partials } from 'discord.js'
|
||||
import config from '../config'
|
||||
import { LabeledResponseDatabase } from './classes/Database'
|
||||
import { pathJoinCurrentDir } from './utils/fs' with { type: 'macro' }
|
||||
|
||||
export { config }
|
||||
export const logger = createLogger({
|
||||
@@ -52,5 +53,5 @@ export const discord = {
|
||||
],
|
||||
},
|
||||
}),
|
||||
commands: await loadCommands(),
|
||||
commands: await loadCommands(pathJoinCurrentDir(import.meta.url, 'commands')),
|
||||
} as const
|
||||
|
||||
Reference in New Issue
Block a user