Discover Packages
github.com/frykher/disgo
library
package
Version:
v0.0.0-...-cda6680
Opens a new window with list of versions in this module.
Published: Nov 15, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
const (
GATEWAY string = "wss://gateway.discord.gg/?v=9&encoding=json"
API string = "https://discord.com/api/v9"
)
type Channel struct {
ID Snowflake `json:"id"`
GuildID *Snowflake `json:"guild_id"`
Type int `json:"type"`
Name *string `json:"name"`
}
type GuildMember struct {
User *User `json:"user"`
Nick *string `json:"nick"`
Roles []Snowflake `json:"roles"`
JoinedAt string `json:"joined_at"`
Avatar *string `json:"avatar"`
}
type Heartbeat struct {
Op int `json:"op"`
Data *int64 `json:"d"`
}
type Hello struct {
Op int `json:"op"`
Data struct {
Heartbeat_interval time .Duration `json:"heartbeat_interval"`
} `json:"d"`
}
type Identify struct {
Op int `json:"op"`
Data struct {
Token string `json:"token"`
Properties struct {
Os string `json:"os"`
Browser string `json:"browser"`
Device string `json:"device"`
} `json:"properties"`
Intents int `json:"intents"`
} `json:"d"`
}
type Message struct {
ID Snowflake `json:"id"`
ChannelID Snowflake `json:"channel_id"`
GuildID *Snowflake `json:"guild_id"`
Author *User `json:"author"`
Content string `json:"content"`
}
Only used for receiving, sending is handled
by the other structures
type PostMessage struct {
Content string `json:"content"`
Message_reference struct {
Channel_id string `json:"channel_id"`
Message_id string `json:"message_id"`
Guild_id string `json:"guild_id"`
} `json:"message_reference"`
}
type Ready struct {
Version int `json:"v"`
SessionID string `json:"session_id"`
Shard []int `json:"shard"`
User User `json:"user"`
Guilds []*Guild `json:"guilds"`
}
type SocketConnection struct {
}
type User struct {
ID Snowflake `json:"id"`
Username string `json:"username"`
Discriminator string `json:"discriminator"`
Avatar string `json:"avatar"`
Bot bool `json:"bot"`
Email string `json:"email"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.