Commit graph

1402 commits

Author SHA1 Message Date
Fedor Lapshin
82c5aae791
Merge pull request #1049 from FedorLap2006/modals
Modals
2022-02-16 02:18:39 +03:00
nitroflap
a731868627
fix(interactions): unnecessary newline between field and comment 2022-02-16 02:16:44 +03:00
nitroflap
195a4c4418
fix(interactions): typo in comment to ModalSubmitData 2022-02-16 02:15:16 +03:00
nitroflap
e44c83a1fc
feat(interactions): added note about modals to InteractionResponse 2022-02-16 02:13:29 +03:00
Fedor Lapshin
d3554153f1
Merge pull request #1089 from constantoine/master
Add MessageFlags values
2022-02-16 01:48:10 +03:00
Fedor Lapshin
6fe303cd29
Merge pull request #1087 from FedorLap2006/master
Dropping user account endpoints and functionality
2022-02-15 23:43:56 +03:00
nitroflap
3f0e0f8650
fix: typo in comment to New function 2022-02-15 23:42:22 +03:00
nitroflap
e6b33f37b7
fix(components): renamed TextInputStyleType to TextInputStyle and fixed example 2022-02-09 14:12:31 +03:00
Fedor Lapshin
21ba398898
feat(components): add omitempty and use TextInputStyle
Co-authored-by: ToπSenpai <15636011+TopiSenpai@users.noreply.github.com>
2022-02-09 14:07:36 +03:00
constantoine
7248e0673e Explicit values 2022-02-09 11:59:10 +01:00
constantoine
f4ad6e85ea Add MessageFlags values 2022-02-09 11:23:02 +01:00
Fedor Lapshin
147703db8e
feat(components): renamed TextStyleType to TextInputStyleType 2022-02-09 03:58:16 +03:00
nitroflap
dcf6fe0128
fix(examples/modals): more renaming of InputText to TextInput 2022-02-09 03:47:44 +03:00
nitroflap
19d46d852a
feat(examples/modals): added MinLength 2022-02-09 03:46:09 +03:00
nitroflap
1b48b9b22e
fix(examples/modals): renamed InputText to TextInput 2022-02-09 03:45:50 +03:00
nitroflap
a0095c14ed
chore(components): rename InputText to TextInput 2022-02-09 03:39:28 +03:00
nitroflap
a8b351019f
feat(*): dropped more undocumented endpoints 2022-02-08 20:43:43 +03:00
nitroflap
d5c82ad374
feat(*)!: dropped undocumented endpoints 2022-02-08 18:25:24 +03:00
nitroflap
5bf32ec183
feat: dropped unnecessary tests for New function 2022-02-08 17:15:51 +03:00
nitroflap
e253d2882e
fix(discord#New): fixed imports and removed MakeIntent 2022-02-08 17:15:49 +03:00
Fedor Lapshin
6ff665e56e
feat: drop email-password session authentication.
This commit drops old email/password authentication for New function.
It violates Discord ToS and due to recent changes in rules for community resources on Discord API Docs it needs to be dropped.
2022-02-08 17:15:43 +03:00
Jordan Cartwright
aba5dc811d
Stickers (#1057)
* added in sticker endpoints

* added sticker objects to messages

* add type to Sticker struct
2022-02-02 14:46:01 -05:00
ToπSenpai
4620fe3034
add interaction locales (#1073)
* add interaction locales

* Typos

* Fix locales documentation link

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2022-02-02 14:45:15 -05:00
Riley Smith
29269347e8
Add guild member timeouts (#1061)
* added guild member timeouts

* fix spelling error

* Use time.Time, allow timeout removal

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2021-12-27 21:38:45 -05:00
Carson Hoffman
7c455ffc70
Allow marshaling of data field in interactions 2021-12-27 21:34:15 -05:00
Carson Hoffman
fccf6db03e
Remove Timestamp type, use time.Time 2021-12-24 12:38:50 -05:00
nitroflap
09e3d894b7
feat: modal interactions and text input component 2021-12-09 04:03:43 +03:00
Elliot Williams
092735083d
Add Member to MessageReactionAdd (#1042)
https://discord.com/developers/docs/topics/gateway#message-reaction-add
2021-12-04 12:02:45 -05:00
Carson Hoffman
55f4934ba7
Add MessageComponentFromJSON 2021-12-02 15:07:38 -05:00
Fedor Lapshin
fd6228c0d5
Slash commands options auto completion (#1014)
* feat(interactions): options autocompletion

* fix(examples/autocomplete): typo in comment

Replaced "returining" with "returning"
2021-11-16 22:56:33 -05:00
AKU
007bf76790
fix: add missing (*Guild).BannerURL() method (#1023)
Signed-off-by: AKP <tom@tdpain.net>
2021-10-27 19:56:26 -04:00
Fedor Lapshin
f0b7e81468
feat: ephemeral attachments (#1008) 2021-10-10 11:09:59 -04:00
Han Seung Min - 한승민
9f89234f3f
Update invalid link to docs (#1010) 2021-10-10 11:02:24 -04:00
Fedor Lapshin
4249df2359
Channel type restriction (#1015) 2021-10-10 10:59:59 -04:00
xIceArcher
842ddb357a
Support for multiple embeds in message routes (#1000) 2021-10-10 10:56:47 -04:00
rigormorrtiss
0fad116c6c
feat: add ActivityTypeCompeting (5) (#990) 2021-08-21 13:50:00 -04:00
vertex-admin
d655d6df7b
Add BeforeDelete to GuildDelete struct (#962) 2021-08-20 18:48:45 -04:00
vertex-admin
be90532eda
Add SessionStartLimit to GatewayBotResponse struct (#949)
Current GatewayBotResponse struct is missing the information required for max concurrency sharding.
2021-08-20 18:46:59 -04:00
Fedor Lapshin
9d9602318a
Context menus (#978)
* Interactions: context menus

* Example for message context menus

* Added flags to followups

* Example for user context menus

* Godoc fix

* Rebase fix

* Update message types to reflect new separations

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2021-08-18 16:16:46 -04:00
Carson Hoffman
f7454d039f
Add more safety around message reference misuse 2021-08-10 21:40:36 -04:00
rigormorrtiss
460b371cce
Add ActivityTypeWatching (3) (#983) 2021-08-08 20:33:41 -04: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
Carson Hoffman
083bf5c1d9
Improve handling of invalid interaction situations 2021-07-25 13:39:31 -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
Xpl0itR
e72c457cb4
Get webhook message endpoint (#948)
* Get interaction response message by interaction token

* Rename methods
2021-06-17 17:19:10 -04:00
Carson Hoffman
f5bb723db8
Convert more constants to absolute values
See 843c765ae3 for reasoning.
2021-05-29 17:55:43 -04:00
Branden J Brown
f36553e31f
fix UserFlags constant types (#937)
Only UserFlagDiscordEmployee had type UserFlags. All other constants
defined in the same block were untyped integer constants.

This change makes all UserFlags constants have type UserFlags. The
primary impact is that godoc and pkg.go.dev should render these
constants under the documentation for UserFlags, rather than under
package-level constants.
2021-05-25 22:09:34 -04:00
Pierce
ccf3b3738e
add ApplicationCommandInteractionDataResolved struct (#919)
* add ApplicationCommandInteractionDataResolved struct

* add comment to ApplicationCommandInteractionDataResolved

* change wording of comment for ApplicationCommandInteractionDataResolved
2021-05-25 22:06:38 -04:00
John Olheiser
df74d8bbe6
README updates (#935)
* go fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update README

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2021-05-20 00:13:20 -04:00