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

refactor(cmdroute)!: change data to resp #375

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

Serpentiel
Copy link

@Serpentiel Serpentiel commented Feb 12, 2023

changes cmdroute to work with *api.InteractionResponse instead of *api.InteractionResponseData

this would allow to return modals via command interactions done through cmdroute

this PR is a breaking change

@diamondburned
Copy link
Owner

I think it would be better if we introduce a new non-breaking API that apps can use to implement this when they need to instead of breaking the current API.

I'll have to look into this soon.

@diamondburned diamondburned self-assigned this Feb 25, 2023
@Serpentiel
Copy link
Author

to make it non-breaking, I believe one has to modify this place:

found, ok := r.findHandler(ev, discord.CommandInteractionOption{
Type: cmdType,
Name: data.Name,
Options: data.Options,
})

and introduce a new type of handler which is used there then

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

Successfully merging this pull request may close these issues.

3 participants