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>
We define our permissions constants based on Discord's values,
and thus the use of `iota` is fragile, makes docs harder to read,
and makes changes touching these constants harder to review.
Here, we now use the full 64-bit representation of each constant,
which both removes the implicit ordering dependencies and makes
the values easier to immediately see.
* 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>