interaction

package
v0.0.0-...-7245f98 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFollowupMessageOptions

type CreateFollowupMessageOptions struct {
	Content         string                 `json:"content,omitempty"`
	Username        string                 `json:"usernamem,omitempty"`
	AvatarURL       string                 `json:"avatar_url,omitempty"`
	TTS             bool                   `json:"tts,omitempty"`
	Embeds          []*sigil.Embed         `json:"embeds,omitempty"`
	AllowedMentions *sigil.AllowedMentions `json:"allowed_mentions,omitempty"`
	Components      []*sigil.ActionRow     `json:"components,omitempty"`
	Files           []*sigil.File          `json:"-"`
}

CreateFollowupMessageOptions are used to create a followup Message to an Interaction Response.

type EditFollowupMessageOptions

type EditFollowupMessageOptions struct {
	Content         null.String            `json:"content,omitempty"`
	Embeds          []*sigil.Embed         `json:"embeds,omitempty"`
	AllowedMentions *sigil.AllowedMentions `json:"allowed_mentions,omitempty"`
	Components      []*sigil.ActionRow     `json:"components,omitempty"`
	Files           []*sigil.File          `json:"files,omitempty"`
}

EditFollowupMessageOptions are used to edit an existing followup Message.

type EditOriginalResponseOptions

type EditOriginalResponseOptions struct {
	Content         null.String            `json:"content,omitempty"`
	Embeds          []*sigil.Embed         `json:"embeds,omitempty"`
	AllowedMentions *sigil.AllowedMentions `json:"allowed_mentions,omitempty"`
	Components      []*sigil.ActionRow     `json:"components,omitempty"`
	Files           []*sigil.File          `json:"files,omitempty"`
}

EditOriginalResponseOptions are used to edit the original response to the Interaction.

type Fly

type Fly struct {
	// contains filtered or unexported fields
}

Fly is a resource used to interact with an Interaction.

func New

func New(client flies.RestClient, applicationID, interactionID, interactionToken string) *Fly

New creates a new Fly.

func (*Fly) CreateFollowupMessage

func (f *Fly) CreateFollowupMessage(ctx context.Context, opts *CreateFollowupMessageOptions) (*sigil.Message, error)

CreateFollowupMessage creates a Message as a followup to an Interaction Response.

func (*Fly) DeleteFollowupMessage

func (f *Fly) DeleteFollowupMessage(ctx context.Context, id string) error

DeleteFollowupMessage deletes a Message given its ID.

func (*Fly) DeleteOriginalResponse

func (f *Fly) DeleteOriginalResponse(ctx context.Context) error

DeleteOriginalResponse deletes the original response of the Interaction.

func (*Fly) EditFollowupMessage

func (f *Fly) EditFollowupMessage(ctx context.Context, id, threadID string, opts *EditFollowupMessageOptions) (*sigil.Message, error)

EditFollowupMessage edits an existing followup Message.

func (*Fly) EditOriginalResponse

func (f *Fly) EditOriginalResponse(ctx context.Context, threadID string, opts *EditOriginalResponseOptions) (*sigil.Message, error)

EditOriginalResponse edits the original response to the Interaction.

func (*Fly) GetFollowupMessage

func (f *Fly) GetFollowupMessage(ctx context.Context, id string) (*sigil.Message, error)

GetFollowupMessage fetches a followup Message.

func (*Fly) GetOriginalResponse

func (f *Fly) GetOriginalResponse(ctx context.Context, threadID string) (*sigil.Message, error)

GetOriginalResponse fetches the original response of an Interaction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL