Skip to content

Commit

Permalink
Merge pull request #4 from tjsr/fix/launch-sync
Browse files Browse the repository at this point in the history
Fix failure where launch type command is found and can't sync.
  • Loading branch information
ssMMiles authored Aug 16, 2024
2 parents f7c6924 + ce6656c commit 5d4914c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/core/src/app/managers/CommandManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ export class CommandManager {
[ApplicationCommandType.Message]: new Map()
};

commands.map((command) => parsed[command.type].set(command.name, command));
commands.map((command) => {
if (parsed?.[command.type] === undefined) {
console.warn(`Unrecognized command type: ${command.type}`);
return;
}

parsed[command.type].set(command.name, command);
});

return parsed;
}
Expand Down

0 comments on commit 5d4914c

Please sign in to comment.