Commit graph

1593 commits

Author SHA1 Message Date
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
Carson Hoffman
9e4f05730f
Revert "Update user.go (#934)" (#936)
This reverts commit 1998af926e.
2021-05-20 00:03:07 -04:00
Aditya Jha
1998af926e
Update user.go (#934) 2021-05-19 22:49:11 -04:00
chanbakjsd
8dc42757be
Add ping pong example for direct messages (#882)
This commit adds an example on sending direct messages as it's a
frequently asked question.
The example sends a "Pong" response through DM when a user sends "ping"
in any channel the bot has the permission to see.

The example is simply adopted from the ping pong example.
2021-05-14 22:34:46 -04:00
Eric Wohltman
9c33bfbada
Update unmarshal function to wrap ErrJSONUnmarshal and return specific error message. Requires at least Go 1.13. (#924) 2021-05-14 22:30:27 -04:00
person-with-a-username
a7c15e1bab
Misc changes to docs (#907)
* Misc changes

* Update index.md

Fix GettingStarted link + misc changes

* Update index.md

Fix DiscordGo image

* Update README.md

Fix image

* Fix image
2021-05-14 22:19:57 -04:00
Pierce
ec2cf69202
Remove deprecated response types (#930)
* update deprecated notices

* remove deprecated response types

* remove InteractionResponseChannelMessage usage

* remove deprecated response types from example options

* stop using iota for respone type constants
2021-05-14 22:18:50 -04:00
Pierce
7d7206b01b
Bulk command overwrite (#926)
* add session.ApplicationCommandBulkOverwrite

* change ApplicationCommandBulkOverwrite to take a guildID

* formatting

* add omitempty to ID of ApplicationCommand
2021-05-11 23:51:33 -04:00
Pierce
cbae312c9d
add ApplicationCommandOptionMentionable (#918) 2021-05-10 17:01:10 -04:00
bwmarrin
0f05488fa0
Merge pull request #925 from courtier/typo-fixes
Fix all the typos that goreportcard detected.
2021-05-06 10:17:29 -05:00