1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-27 09:12:53 +00:00

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

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.