Documentation ¶
Index ¶
- Constants
- type Attachment
- type Component
- type File
- type Handler
- func (h *Handler) Delete(channelID, messageID string) error
- func (h *Handler) Edit(channelID, messageID string, message Message, files []File) (*Message, error)
- func (h *Handler) GetChannelWebhook(channelID string) *discordgo.Webhook
- func (h *Handler) GetGuildChannels(guildID string) (channels []discordgo.Channel, err error)
- func (h *Handler) GetMessage(channelID, messageID string) (message discordgo.Message, err error)
- func (h *Handler) GetMessages(channelID string, around string) (messages []discordgo.Message, err error)
- func (h *Handler) Reset()
- func (h *Handler) Send(channelID string, message Message, wait bool, files []File) (*Message, error)
- func (h *Handler) SetHookURI(uri string) error
- type Message
- type Option
Constants ¶
View Source
const DiscordAPIEndpoint = "https://discord.com/api"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` ID string `json:"id"` ProxyURL string `json:"proxy_url,omitempty"` Filename string `json:"filename,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Size int `json:"size,omitempty"` }
type Component ¶
type Component struct { Type int `json:"type"` CustomID string `json:"custom_id,omitempty"` Disabled bool `json:"disabled,omitempty"` Style int `json:"style,omitempty"` Label string `json:"label,omitempty"` URL string `json:"url,omitempty"` Placeholder string `json:"placeholder,omitempty"` MinValues int `json:"min_values,omitempty"` MaxValues int `json:"max_values,omitempty"` Components []Component `json:"components,omitempty"` Emoji *discordgo.Emoji `json:"emoji,omitempty"` Options []Option `json:"options,omitempty"` }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) GetChannelWebhook ¶
func (*Handler) GetGuildChannels ¶
func (*Handler) GetMessage ¶
func (*Handler) GetMessages ¶
func (*Handler) SetHookURI ¶
type Message ¶
type Message struct { Components []Component `json:"components,omitempty"` AvaterURL string `json:"avatar_url,omitempty"` Attachments []Attachment `json:"attachments"` UserName string `json:"username,omitempty"` ID string `json:"id"` ChannelID string `json:"channel_id"` GuildID string `json:"guild_id,omitempty"` Content string `json:"content"` Timestamp time.Time `json:"timestamp"` EditedTimestamp time.Time `json:"edited_timestamp"` MentionRoles []string `json:"mention_roles"` TTS bool `json:"tts"` MentionEveryone bool `json:"mention_everyone"` Author *discordgo.User `json:"author"` Embeds []*discordgo.MessageEmbed `json:"embeds"` Mentions []*discordgo.User `json:"mentions"` Reactions []*discordgo.MessageReactions `json:"reactions"` Pinned bool `json:"pinned"` Type discordgo.MessageType `json:"type"` WebhookID string `json:"webhook_id"` Member *discordgo.Member `json:"member"` MentionChannels []*discordgo.Channel `json:"mention_channels"` Activity *discordgo.MessageActivity `json:"activity"` Application *discordgo.MessageApplication `json:"application"` MessageReference *discordgo.MessageReference `json:"message_reference"` Flags discordgo.MessageFlags `json:"flags"` }
Click to show internal directories.
Click to hide internal directories.