Skip to content

Commit

Permalink
fix(SkeletonClient): actually fix deployment of menu commands
Browse files Browse the repository at this point in the history
silly me
  • Loading branch information
zapteryx committed Jun 14, 2024
1 parent 9d7d2bd commit b1ab16e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/SkeletonClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,23 @@ export class SkeletonClient extends Client {
}
// Add the command data to the command data array
this.commandData.push(handlerData.data);
} else if (
camelCaseHandlerType === 'menuCommand' &&
handlerData.isMenuCommandHandler()
) {
if (
this.menuCommandData.some(
(data): boolean =>
data.name === handlerData.data.name,
)
) {
this._logger.warn(
`Error loading ${module} > ${handlerType} > ${handler}: Context menu command data is conflicting with a previously loaded context menu command; skipping`,
);
continue;
}
// Add the command data to the command data array
this.menuCommandData.push(handlerData.data);
}
if (
camelCaseHandlerType !== 'event' &&
Expand Down

0 comments on commit b1ab16e

Please sign in to comment.