Skip to content

Commit

Permalink
fix: don't let new entry point commands block
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilloftheshadow committed Sep 10, 2024
1 parent d073ccc commit 29f8493
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-sheep-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@buape/carbon": patch
---

fix: don't let new entry point commands block
3 changes: 3 additions & 0 deletions packages/carbon/src/abstracts/BaseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export abstract class BaseCommand {
* @internal
*/
serialize() {
if (this.type === ApplicationCommandType.PrimaryEntryPoint) {
throw new Error("Primary Entry Point commands cannot be serialized")
}
// Only chat input commands can have descriptions
if (this.type === ApplicationCommandType.ChatInput) {
const data: RESTPostAPIApplicationCommandsJSONBody = {
Expand Down

0 comments on commit 29f8493

Please sign in to comment.