Documentation
¶
Index ¶
- Constants
- type APIError
- type Channel
- type Client
- func (c *Client) DeferInteraction(ctx context.Context, interaction Interaction, ephemeral bool) error
- func (c *Client) Gateway(ctx context.Context, handler EventHandler) error
- func (c *Client) GatewayEndpoint() string
- func (c *Client) REST(ctx context.Context, method, path string, body, dest any) error
- func (c *Client) RespondToInteraction(ctx context.Context, interaction Interaction, options MessageOptions, ...) error
- func (c *Client) SendInteractionFollowup(ctx context.Context, interaction Interaction, options MessageOptions, ...) (Message, error)
- func (c *Client) SendMessage(ctx context.Context, channelID, content, replyTo string) (Message, error)
- func (c *Client) SendMessageWithOptions(ctx context.Context, channelID string, options MessageOptions) (Message, error)
- type Config
- type Embed
- type EmbedAuthor
- type EmbedField
- type EmbedFooter
- type EmbedMedia
- type Event
- type EventHandler
- type Guild
- type Interaction
- type Message
- type MessageCreate
- type MessageOptions
- type User
- type VoiceServerUpdate
- type VoiceState
Constants ¶
View Source
const DefaultOrigin = "https://micup.gg"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BotID string
MessageContentEnabled *bool
// contains filtered or unexported fields
}
func (*Client) DeferInteraction ¶ added in v0.2.0
func (*Client) GatewayEndpoint ¶ added in v0.2.0
func (*Client) RespondToInteraction ¶ added in v0.2.0
func (c *Client) RespondToInteraction(ctx context.Context, interaction Interaction, options MessageOptions, ephemeral bool) error
func (*Client) SendInteractionFollowup ¶ added in v0.2.0
func (c *Client) SendInteractionFollowup(ctx context.Context, interaction Interaction, options MessageOptions, ephemeral bool) (Message, error)
func (*Client) SendMessage ¶
func (*Client) SendMessageWithOptions ¶ added in v0.2.0
type Embed ¶ added in v0.2.0
type Embed struct {
Title string `json:"title,omitempty"`
Type string `json:"type,omitempty"`
Description string `json:"description,omitempty"`
URL string `json:"url,omitempty"`
Timestamp string `json:"timestamp,omitempty"`
Color int `json:"color,omitempty"`
Image *EmbedMedia `json:"image,omitempty"`
Thumbnail *EmbedMedia `json:"thumbnail,omitempty"`
Author *EmbedAuthor `json:"author,omitempty"`
Fields []EmbedField `json:"fields,omitempty"`
}
type EmbedAuthor ¶ added in v0.2.0
type EmbedField ¶ added in v0.2.0
type EmbedFooter ¶ added in v0.2.0
type EmbedFooter struct {
}
type EmbedMedia ¶ added in v0.2.0
type EmbedMedia struct {
URL string `json:"url"`
}
type Event ¶
type Event struct {
Name string
Sequence *int64
Data json.RawMessage
// contains filtered or unexported fields
}
type Interaction ¶ added in v0.2.0
type Interaction struct {
ID string `json:"id"`
ApplicationID string `json:"application_id"`
Type int `json:"type"`
Data json.RawMessage `json:"data,omitempty"`
GuildID string `json:"guild_id,omitempty"`
ChannelID string `json:"channel_id,omitempty"`
Token string `json:"token"`
Version int `json:"version,omitempty"`
Member json.RawMessage `json:"member,omitempty"`
User json.RawMessage `json:"user,omitempty"`
}
type MessageCreate ¶
type MessageOptions ¶ added in v0.2.0
type VoiceServerUpdate ¶
type VoiceState ¶
Click to show internal directories.
Click to hide internal directories.