Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
ID string `json:"id"`
// Use either 0 for guild text channels, 2 for guild voice channels
// Make sure to check https://discord.com/developers/docs/resources/channel#channel-object-channel-types for more info.
Type int `json:"type"`
GuildID string `json:"guild_id,omitempty"`
Name string `json:"name,omitempty"`
Topic string `json:"topic,omitempty"`
IsNsfw bool `json:"nsfw,omitempty"`
// This field is not set by default. You have to use the FetchGuild() method to fetch it, it will automatically set
// this field after calling it.
Guild Guild `json:"-"`
}
Represents a discord channel
func (*Channel) FetchGuild ¶
type Guild ¶
type Guild struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Icon string `json:"icon"`
OwnerID string `json:"owner_id"`
// Channels are only set after creating a guild. This object will be empty after running Client's GetGuild() method.
// To fetch channels, use Guild's FetchChannels() method.
Channels []Channel `json:"channels"`
// Members are only set after creating a guild. This object will be empty after running Client's GetGuild() method.
// To fetch Members, use Guild's FetchMembers() method.
Members []Member `json:"members"`
}
func (*Guild) CreateChannel ¶
TODO: implement channel creation edits & deletion
func (*Guild) FetchChannels ¶
Fetches channels from the guild, and returns them in a slice. It also sets the `Channels` field of the guild
func (*Guild) FetchMembers ¶
Fetches members from the guild, and returns them in a slice. It also sets the `Members` field of the guild
func (*Guild) FetchRoles ¶
type Message ¶
type Message struct {
Content string `json:"content,omitempty"`
Tts bool `json:"tts,omitempty"`
AllowedMentions []struct{} `json:"allowed_mentions,omitempty"`
// Used to create direct messages. Do not use in guilds.
Recipient string `json:"recipient_id,omitempty"`
Channel Channel `json:"-"`
}
Represents a discord message
type User ¶
type User struct {
ID string `json:"id"`
Username string `json:"username"`
Discriminator string `json:"discriminator"`
Avatar string `json:"avatar"`
Bot bool `json:"bot,omitempty"`
MfaEnabled bool `json:"mfa_enabled,omitempty"`
Banner string `json:"banner,omitempty"`
VerifiedEmail bool `json:"verified,omitempty"`
NitroType int `json:"premium_type,omitempty"`
}
Represents a discord user
func (*User) SendMessage ¶
Click to show internal directories.
Click to hide internal directories.