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.
* 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>
* 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>
* 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
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.
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.
* add session.ApplicationCommandBulkOverwrite
* change ApplicationCommandBulkOverwrite to take a guildID
* formatting
* add omitempty to ID of ApplicationCommand
* update Activity struct and add emoji functions
* fix the emoji regex
* Remove inline type definitions
* Change function name
* fix message_test function name
* make custom unmarshaljson and change `CreatedAt` to `time.Time`
* fix
Co-authored-by: post <61803796+postrequest69@users.noreply.github.com>