Skip to content

Commit 4199257

Browse files
committed
fix: delete disabled buttons in set
1 parent 138db72 commit 4199257

File tree

1 file changed

+8
-0
lines changed
  • packages/jellycommands/src/buttons

1 file changed

+8
-0
lines changed

packages/jellycommands/src/buttons/load.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,13 @@ export async function loadButtons(items: string | Array<string | Button>) {
1414
}
1515
});
1616

17+
for (const button of buttons) {
18+
// Delete disabled buttons
19+
if (button.options.disabled) {
20+
buttons.delete(button);
21+
continue;
22+
}
23+
}
24+
1725
return buttons;
1826
}

0 commit comments

Comments
 (0)