Add application command (slash command) interaction support#136
Open
Levalicious wants to merge 1 commit intoCraftSpider:masterfrom
Open
Add application command (slash command) interaction support#136Levalicious wants to merge 1 commit intoCraftSpider:masterfrom
Levalicious wants to merge 1 commit intoCraftSpider:masterfrom
Conversation
- Add make_interaction_data() to build valid INTERACTION_CREATE gateway payloads - Add FakeWebhookAdapter to intercept interaction responses (create_interaction_response, execute_webhook, edit_webhook_message, delete_webhook_message) - Add InteractionResponse data class with content/embeds/ephemeral/deferred - Add interaction() runner function analogous to message() - Add VerifyInteraction builder for asserting interaction responses - Add interaction_response callback event and queue - Fix _command_tree and __session linkage in configure() - Update run_all_events() to wait for CommandTree-invoker tasks - Export new APIs from __init__.py - Add 7 tests covering commands, options, ephemeral, embeds, verify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an AIslop PR I've been using to test out interactions for my bot. So far, it's been surprisingly usable. I don't expect this to get merged, but thought I'd toss over here for awareness in case someone finds it useful or wants to refine it. Feel free to use whatever portions you find useful for whatever reason.
Part of the reason it's AIslop is because I don't know how it should interact with the send queue. So if someone with a better understanding of the library has change suggestions, lmk.
Addresses #125