Reworked message format, added support for audio messages, made Message class #10

Merged
snxraven merged 20 commits from MiTask/LinkUp-P2P-Chat:main into main 2024-06-14 14:15:43 -04:00
Showing only changes of commit 52a319a1c0 - Show all commits

View File

@ -19,14 +19,14 @@ async function loadCommands() {
for (const file of files) { for (const file of files) {
// Check if the file is a JavaScript file // Check if the file is a JavaScript file
if (file.endsWith('.js')) { if (file.endsWith('.js')) {
// const commandName = path.basename(file, '.js'); const commandName = path.basename(file, '.js');
const commandPath = path.join(commandsDir, file); const commandPath = path.join(commandsDir, file);
// Dynamically import the command module // Dynamically import the command module
const { default: commandModule } = await import(commandPath); const { default: commandModule } = await import(commandPath);
// Add the command module to the commands object // Add the command module to the commands object
commands[commandPath] = commandModule; commands[commandName] = commandModule;
} }
} }