1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package discordgo
- type Webhook struct {
- ID string `json:"id"`
- Type WebhookType `json:"type"`
- GuildID string `json:"guild_id"`
- ChannelID string `json:"channel_id"`
- User *User `json:"user"`
- Name string `json:"name"`
- Avatar string `json:"avatar"`
- Token string `json:"token"`
-
- ApplicationID string `json:"application_id,omitempty"`
- }
- type WebhookType int
- const (
- WebhookTypeIncoming WebhookType = iota
- WebhookTypeChannelFollower
- )
- type WebhookParams struct {
- Content string `json:"content,omitempty"`
- Username string `json:"username,omitempty"`
- AvatarURL string `json:"avatar_url,omitempty"`
- TTS bool `json:"tts,omitempty"`
- Files []*File `json:"-"`
- Embeds []*MessageEmbed `json:"embeds,omitempty"`
- AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
- }
- type WebhookEdit struct {
- Content string `json:"content,omitempty"`
- Embeds []*MessageEmbed `json:"embeds,omitempty"`
- AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
- }
|