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:
@@ -1,7 +1,16 @@
|
||||
import 'dotenv/config'
|
||||
|
||||
import { bot } from './bot.js'
|
||||
import importDirectory from './utils/loader.js'
|
||||
import { updateApplicationCommands } from './utils/updateCommands.js'
|
||||
|
||||
bot.logger.info('Loading commands...')
|
||||
await importDirectory('./dist/commands')
|
||||
|
||||
bot.logger.info('Updating commands...')
|
||||
await updateApplicationCommands()
|
||||
|
||||
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