Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[slash-commands] Standardize Reject/Reply errors #12

Open
dustinlacewell opened this issue Dec 24, 2022 · 1 comment
Open

[slash-commands] Standardize Reject/Reply errors #12

dustinlacewell opened this issue Dec 24, 2022 · 1 comment

Comments

@dustinlacewell
Copy link
Contributor

Create standard error types for slash commands.

At minimum we should have errors that can be thrown from down stream services that when caught by slash command base class automatically get routed as interaction replies.

The error types should have an .ephemeral boolean field to indicate whether the reply should be ephemeral or not.

@dustinlacewell
Copy link
Contributor Author

Devil's advocate: While it is certainly convenient to simply throw an error from some service in order to propagate a response back to the interaction, it's a bit of a hack.

Ideally, services would throw/return locally relevant errors and data at each level of abstraction with the command finally interpreting behavior and appropriately reporting and negotiating interaction semantics.

Nevertheless, this might be a handy underlying convenience when you just want some simple behavior you intend to improve later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant