1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 04:24:19 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Tadeo Kondrak 2ec0e6b011
discord: Use json.Unmarshal instead for CommandInteractionOption (#292)
This ensures valid JSON strings are processed using the JSON rules, not
the Go rules.
2021-11-13 15:18:52 -08:00
Tadeo Kondrak c98e2f8730 discord: Add Options field to AutocompleteOption
This is used for subcommands.
2021-11-13 13:45:26 -08:00
diamondburned 331ec59dec discord: Refactor interactions and components
This commit gets rid of contain-it-all structs and instead opt for
interface union types containing underlying concrete types with no
overloading.

The code is much more verbose by doing this, but the API is much nicer
to use. The only disadvantage in that regard is the interface assertion
being too verbose and risky for users at times.
2021-11-12 11:38:36 -08:00
Hamza Ali 6fba21d704
api: Implement autocomplete components 2021-11-09 14:49:21 -08:00
diamondburned 76ec9cd43d discord: Fix InteractionOption.String 2021-09-09 21:12:22 -07:00
samhza dc92845315
discord: move Interaction over; update api.CommandCreateData (#274)
- Moved gateway.InteractionCreateData to discord.Interaction, now
gateway.InteractionCreateData is a struct that wraps
discord.Interaction.
- Split InteractionData into CommandInteractionData and
ComponentInteractionData.
- Renamed ButtonInteraction to ComponentInteraction.
- Updated api.CommandCreateData to add new fields.
- Update Component types' Type() methods to pointer receivers.
2021-09-09 16:06:44 -07:00