1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-09-28 05:08:59 +00:00
Commit graph

27 commits

Author SHA1 Message Date
sam c1cc1b8a54
discord: Add the other select interaction data types (#377) 2023-02-21 16:28:14 -08:00
twoscott 1b31249626 discord: Add new select components 2022-11-20 20:17:44 -08:00
diamondburned 329ad0f404
discord: Add AutocompleteOptions.Unmarshal 2022-10-13 23:01:29 -07:00
diamondburned b6221c6426
discord: Use the right type for AutocompleteOption.Options 2022-10-13 23:01:28 -07:00
diamondburned 70a7a3e44f
discord: Add some omitempty for interaction.go 2022-10-13 23:01:28 -07:00
diamondburned adce55b02d
discord: Add ContainerComponents.Unmarshal
This feature is similar to the one added a few commits prior.
2022-08-15 14:57:30 -07:00
diamondburned 10fd739d9e
discord: Type validation for CommandInteractionOptions.Unmarshal 2022-08-15 00:13:12 -07:00
diamondburned 47c06557c2
discord: Add CommandInteractionOptions.Unmarshal
This commit adds an Unmarshal method into CommandInteractionOptions. It
is probably the first commit to break the rule of keeping package
discord simple.

The goal of this rationale is that package discord should continue
prioritizing convenience and ease of use by providing small, helpful
additions without being oversized.

This method, while it uses reflect, is actually fairly small in
implementation. Its functionality should be kept to a bare minimum and
as such will not cover every single use case (but should cover most).
2022-08-14 23:40:06 -07:00
diamondburned 0321b9247f
discord: Document *ModalInteraction in InteractionData 2022-08-14 21:45:47 -07:00
twoscott 09c3314cc2 discord: Add resolved interaction attachments 2022-07-10 14:30:51 -07:00
Vendicated c1e8daec60 Add TargetMessageID and TargetUserID convenience functions 2022-07-05 13:21:22 -07:00
Vendicated fc2319e652 Add GuildID and TargetID to CommandInteraction 2022-07-05 13:21:22 -07:00
twoscott 8732dc1ff6 discord: Allow multiple types for AutocompleteOption Value 2022-06-05 17:56:52 -07:00
twoscott b01675ab92 discord: Add AutocompleteOptions type & Find() 2022-06-05 17:56:52 -07:00
diamondburned bd0369136f
discord: Add InteractionEvent.{Guild,}Locale 2022-04-12 10:43:02 -07:00
Tyler Stuyfzand 6dc189519c
discord: Add Type to CommandInteractionOption (#312) 2022-02-13 22:40:26 -08:00
ItsLychee d6bc738e50
discord: Modal interaction support (#310)
* Support modal interactions along with the TextInput component

* Replace ModalInteraction with Modal to prevent confusion

* Fix the required field from not being used correctly

* PR Fixes
2022-02-13 19:15:28 -08:00
PL Pery 9cd0c7ed28
discord: Add CommandInteractionOptions (#300)
* feat: Find method on options

* doc comment
2022-01-03 13:37:18 -08:00
diamondburned bfd668ff99
discord: Fix unmarshaling PingInteraction 2022-01-02 23:55:57 -08:00
diamondburned 5c4a989746
discord: Add CommandInteraction.Resolved 2021-12-27 15:10:09 -08:00
diamondburned 8d78221de0
discord: Improve union interface documentation; fix *Option JSON 2021-11-25 15:02:24 -08:00
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