Documentation
¶
Index ¶
- type EditMessageOptions
- type Fly
- type ModifyTokenWebhookOptions
- type ModifyWebhookOptions
- type TokenFly
- func (f *TokenFly) Delete(ctx context.Context) error
- func (f *TokenFly) DeleteMessage(ctx context.Context, mid, threadID string) error
- func (f *TokenFly) EditMessage(ctx context.Context, mid, threadID string, opts *EditMessageOptions) (*sigil.Message, error)
- func (f *TokenFly) Get(ctx context.Context) (*sigil.Webhook, error)
- func (f *TokenFly) GetMessage(ctx context.Context, mid, threadID string) (*sigil.Message, error)
- func (f *TokenFly) Modify(ctx context.Context, opts *ModifyTokenWebhookOptions) (*sigil.Webhook, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EditMessageOptions ¶
type EditMessageOptions 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:"-"` }
EditMessageOptions are used to edit a Message sent by a Webhook.
type Fly ¶
type Fly struct {
// contains filtered or unexported fields
}
Fly is a resource used to interact with Webhooks using a Bot OAuth2 token.
func NewFly ¶
func NewFly(rc flies.RestClient, id, token string) *Fly
NewFly creates a new Fly resource.
type ModifyTokenWebhookOptions ¶
type ModifyTokenWebhookOptions struct { Name string `json:"name,omitempty"` Avatar null.String `json:"avatar,omitempty"` }
ModifyTokenWebhookOptions is used to modify a webhook, using the associated token.
type ModifyWebhookOptions ¶
type ModifyWebhookOptions struct { Name string `json:"name,omitempty"` Avatar null.String `json:"avatar,omitempty"` ChannelID string `json:"channel_id,omitempty"` }
ModifyWebhookOptions are used to modify the webhook.
type TokenFly ¶
type TokenFly struct {
// contains filtered or unexported fields
}
TokenFly is a resource used to interact with Webhooks in an unauthenticated manner, rather using tokens generated with the Webhook itself.
func NewTokenFly ¶
func NewTokenFly(rc flies.RestClient, id, token string) *TokenFly
NewTokenFly creates a new TokenFly resource.
func (*TokenFly) DeleteMessage ¶
DeleteMessage deletes a Message sent by the Webhook.
func (*TokenFly) EditMessage ¶
func (f *TokenFly) EditMessage(ctx context.Context, mid, threadID string, opts *EditMessageOptions) (*sigil.Message, error)
EditMessage edits a Message senty by the Webhook.
func (*TokenFly) GetMessage ¶
GetMessage fetches a Message sent by a Webhook.