Commit graph

10 commits

Author SHA1 Message Date
Koke_Cacao
b3638db82a
feat(interactions): implement Attachments field (#1392)
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-12-30 07:24:00 +03:00
Merlin
1f0b57f110
feat(WebhookParams): add thread_name field (#1412)
Add ThreadName field into WebhookParams to allow for creation of forum posts by webhooks.

---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-09-22 16:03:45 +03:00
Andres Perez
d7b4a482b5
Use MessageFlags in InteractionResponseData and WebhookParams (#1178) 2022-05-23 01:14:28 +03:00
plally
c29e0d740f
make WebhookEdit fields pointers (#1174)
* make WebhookEdit fields pointers

* fix examples
2022-05-14 22:43:50 +03:00
Fedor Lapshin
4ebe5a08ee
Selects component (#954)
* Interactions: the Buttons (#933)

* Interactions: buttons

* Doc fix

* Gofmt fix

* Fix typo

* Remaking interaction data into interface

* Godoc fix

* Gofmt fix

* Godoc fix

* InteractionData helper functions and some fixes in slash commands example

* Fix components example

* Yet another fix of components example

* Fix interaction unmarshaling

* Gofmt fix

* Godoc fix

* Gofmt fix

* Corrected naming and docs

* Rolled back API version

* Requested fixes

* Added support of components to webhook and regular messages

* Fix components unmarshaling

* Godoc fix

* Requested fixes

* Fixed unmarshaling issues

* Components example: cleanup

* Added components tracking to state

* Requested fixes

* Renaming fix

* Remove more named returns

* Minor English fixes

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>

* Doc fix

* Gofmt fix

* Fix typo

* Remaking interaction data into interface

* Godoc fix

* Gofmt fix

* Godoc fix

* InteractionData helper functions and some fixes in slash commands example

* Fix components example

* Yet another fix of components example

* Fix interaction unmarshaling

* Godoc fix

* Gofmt fix

* Corrected naming and docs

* Rolled back API version

* Requested fixes

* Added support of components to webhook and regular messages

* Interactions: select menus

* Example fix

* Merge fix

* Some fixes

* Added missing documentation

* Fix components unmarshaling

* Godoc fix

* Requested fixes

* Fixed unmarshaling issues

* Components example: cleanup

* Gofmt fix

* Godoc fix

* URL field renaming fix

* Added flags to followups

* Updated components example

* Fixed typo in components example

* Merge fix

* Improve handling of invalid interaction situations

* support allowing webhook edits with files, and responding to interactions with files (#931)

* allow files in webhook message edits

* add Files to WebhookEdit struct

* move the construction of the multipart body for files into a shared function

* allow  interaction responses to have files

* go fmt

* fix err shadowing

* document MakeFilesBody

* rename MakeFilesBody -> EncodeWithFiles. fix InteractionRespond responding twice

* use resp in InteractionRespond files, add basic-command-with-files example command

* import strings and go fmt

* EncodeWithFiles -> MultiPartBodyWithJSON

* go fmt

* fix example for slash_commands

* move files to responsedata

* Merge fixes

* Fixed rebase consequences

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
Co-authored-by: plally <pierce@vulpes.dev>
2021-08-08 20:16:07 -04:00
plally
ab47f123ba
support allowing webhook edits with files, and responding to interactions with files (#931)
* allow files in webhook message edits

* add Files to WebhookEdit struct

* move the construction of the multipart body for files into a shared function

* allow  interaction responses to have files

* go fmt

* fix err shadowing

* document MakeFilesBody

* rename MakeFilesBody -> EncodeWithFiles. fix InteractionRespond responding twice

* use resp in InteractionRespond files, add basic-command-with-files example command

* import strings and go fmt

* EncodeWithFiles -> MultiPartBodyWithJSON

* go fmt

* fix example for slash_commands

* move files to responsedata
2021-07-30 11:22:08 -04:00
Fedor Lapshin
421e149650
Interactions: the Buttons (#933)
* Interactions: buttons

* Doc fix

* Gofmt fix

* Fix typo

* Remaking interaction data into interface

* Godoc fix

* Gofmt fix

* Godoc fix

* InteractionData helper functions and some fixes in slash commands example

* Fix components example

* Yet another fix of components example

* Fix interaction unmarshaling

* Gofmt fix

* Godoc fix

* Gofmt fix

* Corrected naming and docs

* Rolled back API version

* Requested fixes

* Added support of components to webhook and regular messages

* Fix components unmarshaling

* Godoc fix

* Requested fixes

* Fixed unmarshaling issues

* Components example: cleanup

* Added components tracking to state

* Requested fixes

* Renaming fix

* Remove more named returns

* Minor English fixes

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2021-06-27 12:16:52 -04:00
Carson Hoffman
f5bb723db8
Convert more constants to absolute values
See 843c765ae3 for reasoning.
2021-05-29 17:55:43 -04:00
Carson Hoffman
182d9b48f3
Add more robust file support for webhooks 2021-03-14 12:27:22 -04:00
Fedor Lapshin
b0fa920925
Slash commands (#856)
* UnknownBan error code addition

* GuildBan method implementation

* Gofmt fix

Gofmt fix

* Interactions: application commands basic API and gateway integration

* Some gitignore update

* Application commands and interactions API implementation

* Some fixes

* Some improvements of slash-commands example and slash-commands API

* OAuth2 endpoints backward compatibility

* Gofmt fix

* Requested fixes and documentation improvement for application commands

* Some fixes

* New and more interesting example of slash-commands usage, merging "interaction.go" and "interactions.go" into a single file. And some fixes.

* Gofmt and documentation fixes

* More fixes

* Gofmt fixes

* More fixes!

* Doc and endpoint fixes

* Gofmt fix

* Remove dependence on open gateway connection

* Remove redundant command ID checks

* Fix typo in ApplicationCommandCreate comment

* Tidy up function calls returning body

* Add upcoming API changes

* Correct return value name, swap parameter order

* Add Version field to ApplicationCommand

* Fix up language in comments

* Remove redundant conversion to float64

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2021-02-28 21:54:02 -05:00