Reworked message format, added support for audio messages, made Message class #10
@ -19,14 +19,14 @@ async function loadCommands() {
|
||||
for (const file of files) {
|
||||
// Check if the file is a JavaScript file
|
||||
if (file.endsWith('.js')) {
|
||||
// const commandName = path.basename(file, '.js');
|
||||
const commandName = path.basename(file, '.js');
|
||||
const commandPath = path.join(commandsDir, file);
|
||||
|
||||
// Dynamically import the command module
|
||||
const { default: commandModule } = await import(commandPath);
|
||||
|
||||
// Add the command module to the commands object
|
||||
commands[commandPath] = commandModule;
|
||||
commands[commandName] = commandModule;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user