api: remove InteractionResponseFlags in favor of discord.MessageFlags

See docs:
https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-messages

This is an API change. Use the following commands to update your
projects:

	$ gofmt -w -r 'api.InteractionResponseFlags -> discord.MessageFlags'
	$ gofmt -w -r 'api.EphemeralResponse -> discord.EphemeralMessage'
This commit is contained in:
Samuel Hernandez 2022-08-19 00:52:14 -04:00 committed by diamondburned
parent adce55b02d
commit eb579c8e94
1 changed files with 2 additions and 9 deletions

View File

@ -28,14 +28,6 @@ const (
ModalResponse
)
// InteractionResponseFlags implements flags for an
// InteractionApplicationCommandCallbackData.
//
// https://discord.com/developers/docs/interactions/slash-commands#interaction-response-object-interaction-application-command-callback-data-flags
type InteractionResponseFlags uint
const EphemeralResponse InteractionResponseFlags = 64
type InteractionResponse struct {
Type InteractionResponseType `json:"type"`
Data *InteractionResponseData `json:"data,omitempty"`
@ -69,7 +61,8 @@ type InteractionResponseData struct {
// AllowedMentions are the allowed mentions for the message.
AllowedMentions *AllowedMentions `json:"allowed_mentions,omitempty"`
// Flags are the interaction application command callback data flags.
Flags InteractionResponseFlags `json:"flags,omitempty"`
// Only SuppressEmbeds and EphemeralMessage may be set.
Flags discord.MessageFlags `json:"flags,omitempty"`
// Files represents a list of files to upload. This will not be
// JSON-encoded and will only be available through WriteMultipart.