fix(bots/discord): cross-device link build errors

This commit is contained in:
PalmDevs
2024-07-28 21:14:07 +07:00
parent cdb6001955
commit 38c06997b4
2 changed files with 5 additions and 4 deletions

View File

@@ -17,7 +17,8 @@ await Bun.build({
})
logger.info('Copying config...')
await cp('config.js', 'dist/config.js')
await cp('./config.js', './dist/config.js')
logger.info('Copying database schema...')
await rename('.drizzle', 'dist/.drizzle')
await cp('./.drizzle', './dist/.drizzle', { recursive: true })
await rm('./.drizzle', { recursive: true })

View File

@@ -13,7 +13,7 @@ export { config }
import * as commands from './commands'
import * as schemas from './database/schemas'
import type Command from './classes/Command'
import type { Command } from './commands/types'
export const logger = createLogger({
level: config.logLevel === 'none' ? Number.MAX_SAFE_INTEGER : config.logLevel,
@@ -81,7 +81,7 @@ export const discord = {
},
partials: [Partials.Message, Partials.Reaction],
}),
commands: Object.fromEntries(Object.values<Command>(commands).map(cmd => [cmd.name, cmd])) as Record<
commands: Object.fromEntries(Object.values<Command>(commands).map(cmd => [cmd.data.name, cmd])) as Record<
string,
Command
>,