mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Slash Commands Test
This commit is contained in:
@@ -63,9 +63,19 @@ client.registry
|
||||
])
|
||||
.registerCommandsIn(path.join(__dirname, 'commands'));
|
||||
|
||||
client.slashRegistry.registerCommandsIn(path.join(__dirname, 'slash-commands'));
|
||||
|
||||
client.on('ready', async () => {
|
||||
client.logger.info(`[READY] Logged in as ${client.user.tag}! ID: ${client.user.id}`);
|
||||
|
||||
// Register Slash Commands in Test Server
|
||||
try {
|
||||
const slashCmds = await client.slashRegistry.uploadTestCommands();
|
||||
client.logger.info(`[SLASH] Registered ${slashCmds.length} slash commands for testing!`);
|
||||
} catch (err) {
|
||||
client.logger.error(`[SLASH] Failed to register slash commands for testing:\n${err.stack}`);
|
||||
}
|
||||
|
||||
// Make temp directories
|
||||
const tmpFolderExists = await checkFileExists(path.join(__dirname, 'tmp'));
|
||||
if (!tmpFolderExists) await mkdir(path.join(__dirname, 'tmp'));
|
||||
|
||||
Reference in New Issue
Block a user