mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Add commands dir import to examples register commands (#3848)
This commit is contained in:
@@ -2,6 +2,15 @@ import 'dotenv/config'
|
||||
|
||||
import { bot } from './bot.js'
|
||||
import { updateCommands } from './utils/helpers.js'
|
||||
import importDirectory from './utils/loader.js'
|
||||
|
||||
bot.logger.info('Loading commands...')
|
||||
await importDirectory('./dist/commands')
|
||||
|
||||
bot.logger.info('Updating commands...')
|
||||
await updateCommands()
|
||||
|
||||
bot.logger.info('Done!')
|
||||
|
||||
// We need to manually exit as the REST Manager has timeouts that will keep NodeJS alive
|
||||
process.exit()
|
||||
|
||||
Reference in New Issue
Block a user