discordgo

package
v0.0.0-...-bd14c5e Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRestRequest

func NewRestRequest() *request

Types

type Attachment

type Attachment struct {
	Id       string `json:"id"`
	Filename string `json:"filename"`
	Size     int    `json:"size"`
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type Bucket

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

type ChannelMention

type ChannelMention struct {
	Id      string `json:"id"`
	Type    int    `json:"type"`
	GuildID string `json:"guild_id"`
	Name    string `json:"name"`
}

type Embed

type Embed struct {
	Title       string         `json:"title"`
	Type        string         `json:"type"`
	Description string         `json:"description"`
	Url         string         `json:"url"`
	Timestamp   string         `json:"timestamp"`
	Color       int            `json:"color"`
	Footer      EmbedFooter    `json:"footer"`
	Image       EmbedImage     `json:"image"`
	Thumbnail   EmbedThumbnail `json:"thumbnail"`
	Video       EmbedVideo     `json:"video"`
	Provider    EmbedProvider  `json:"provider"`
	Author      EmbedAuthor    `json:"author"`
	Fields      []EmbedField   `json:"fields"`
}

type EmbedAuthor

type EmbedAuthor struct {
	Name         string `json:"name"`
	Url          string `json:"url"`
	IconUrl      string `json:"icon_url"`
	ProxyIconUrl string `json:"proxy_icon_url"`
}

type EmbedField

type EmbedField struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Inline bool   `json:"inline"`
}

type EmbedFooter

type EmbedFooter struct {
	Text         string `json:"text"`
	IconUrl      string `json:"icon_url"`
	ProxyIconUrl string `json:"proxy_icon_url"`
}

type EmbedImage

type EmbedImage struct {
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type EmbedProvider

type EmbedProvider struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

type EmbedThumbnail

type EmbedThumbnail struct {
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type EmbedVideo

type EmbedVideo struct {
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type Emoji

type Emoji struct {
	Id            string   `json:"id"`
	Name          string   `json:"name"`
	Roles         []string `json:"roles"`
	User          User     `json:"user"`
	RequireColons bool     `json:"require_colons"`
	Managed       bool     `json:"managed"`
	Animated      bool     `json:"animated"`
	Available     bool     `json:"available"`
}

type GatewayConnection

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

func ConnectToGateway

func ConnectToGateway(token string, intents int, handler func(eventName string, eventData json.RawMessage)) (GatewayConnection, error)

type GatewayPayload

type GatewayPayload struct {
	Op int             `json:"op"`
	D  json.RawMessage `json:"d,omitempty"`
	S  int             `json:"s,omitempty"`
	T  string          `json:"t,omitempty"`
}

type GetGatewayResponse

type GetGatewayResponse struct {
	Url               string            `json:"url"`
	Shards            int               `json:"shards"`
	SessionStartLimit SessionStartLimit `json:"session_start_limit"`
}

type HelloPayload

type HelloPayload struct {
	HeartbeatInterval time.Duration `json:"heartbeat_interval"`
}

type IdentityConnectionProperties

type IdentityConnectionProperties struct {
	Os      string `json:"$os"`
	Browser string `json:"$browser"`
	Device  string `json:"$device"`
}

type IdentityPayload

type IdentityPayload struct {
	Token      string                       `json:"token"`
	Properties IdentityConnectionProperties `json:"properties"`
	Intents    int                          `json:"intents"`
}

type Message

type Message struct {
	Id                string              `json:"id,omitempty"`
	ChannelID         string              `json:"channel_id,omitempty"`
	GuildID           string              `json:"guild_id,omitempty"`
	Author            *User               `json:"author,omitempty"`
	Content           string              `json:"content,omitempty"`
	EditedTimestamp   time.Time           `json:"edited_timestamp,omitempty"`
	Tts               bool                `json:"tts,omitempty"`
	MentionsEveryone  bool                `json:"mention_everyone,omitempty"`
	UserMentions      []*User             `json:"mentions,omitempty"`
	RoleMentions      []string            `json:"mention_roles,omitempty"`
	ChannelMentions   []*ChannelMention   `json:"mention_channels,omitempty"`
	Attachments       []*Attachment       `json:"attachments,omitempty"`
	Embeds            []*Embed            `json:"embeds,omitempty"`
	Reactions         []*Reaction         `json:"reactions,omitempty"`
	Pinned            bool                `json:"pinned,omitempty"`
	WebhookID         string              `json:"webhook_id,omitempty"`
	Type              int                 `json:"type,omitempty"`
	Activity          *MessageActivity    `json:"activity,omitempty"`
	Application       *MessageApplication `json:"application,omitempty"`
	MessageReference  *MessageReference   `json:"message_reference,omitempty"`
	Flags             int                 `json:"flags,omitempty"`
	ReferencedMessage *Message            `json:"referenced_message,omitempty"`
}

type MessageActivity

type MessageActivity struct {
	Type    int    `json:"type"`
	PartyId string `json:"party_id"`
}

type MessageApplication

type MessageApplication struct {
	Id          string `json:"id"`
	CoverImage  string `json:"cover_image"`
	Description string `json:"description"`
	Icon        string `json:"icon"`
	Name        string `json:"name"`
}

type MessageReference

type MessageReference struct {
	MessageId string `json:"message_id,omitempty"`
	ChannelId string `json:"channel_id,omitempty"`
	GuildId   string `json:"guild_id,omitempty"`
}

type Reaction

type Reaction struct {
	Count int   `json:"count"`
	Me    bool  `json:"me"`
	Emoji Emoji `json:"emoji"`
}

type ResumePayload

type ResumePayload struct {
	Token     string `json:"token"`
	SessionID string `json:"session_id"`
	Sequence  int    `json:"seq"`
}

type SessionStartLimit

type SessionStartLimit struct {
	Total          int `json:"total"`
	Remaining      int `json:"remaining"`
	ResetAfter     int `json:"reset_after"`
	MaxConcurrency int `json:"max_concurrency"`
}

type User

type User struct {
	Id            string `json:"id,omitempty"`
	Username      string `json:"username,omitempty"`
	Discriminator string `json:"discriminator,omitempty"`
	Avatar        string `json:"avatar,omitempty"`
	Bot           bool   `json:"bot,omitempty"`
	System        bool   `json:"system,omitempty"`
	MfaEnabled    bool   `json:"mfa_enabled,omitempty"`
	Locale        string `json:"locale,omitempty"`
	Verified      string `json:"verified,omitempty"`
	Email         string `json:"email,omitempty"`
	Flags         int    `json:"flags,omitempty"`
	PremiumType   int    `json:"premium_type,omitempty"`
	PublicFlags   int    `json:"public_flags,omitempty"`
}

Jump to

Keyboard shortcuts

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