arikawa icon indicating copy to clipboard operation
arikawa copied to clipboard

refactor(cmdroute)!: change data to resp

Open Serpentiel opened this issue 2 years ago • 2 comments

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

Serpentiel avatar Feb 12 '23 15:02 Serpentiel

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 avatar Feb 25 '23 15:02 diamondburned

to make it non-breaking, I believe one has to modify this place: https://github.com/diamondburned/arikawa/blob/181dcb1bdd007d4d8f42c744278f8f59265bb2b4/api/cmdroute/router.go#L123-L127

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

Serpentiel avatar Feb 26 '23 09:02 Serpentiel