Documentation
¶
Index ¶
- type Attachment
- type Audit
- type Authentication
- type Avatar
- type Channel
- type ChannelRoles
- type ChannelRolesPermission
- type ChannelType
- type ChannelUserPermission
- type DMChannel
- type Discriminator
- type Friend
- type GroupDMChannel
- type Guild
- type GuildChannel
- type GuildChannelReadState
- type GuildChannelUpdatePosition
- type GuildInvite
- type Icon
- type Member
- type Message
- type MessageType
- type NotificationsType
- type Reaction
- type Recovery
- type Registration
- type Role
- type User
- type UserGuild
- type UserRole
- type UserRoles
- type UserSettings
- type UserSettingsAppearance
- type UserSettingsData
- type UserSettingsGuildFolders
- type UserSettingsGuilds
- type UserSettingsNotifications
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Authentication ¶
type ChannelRoles ¶ added in v1.4.0
type ChannelRoles struct {
ChannelId int64 `db:"channel_id"`
Roles pq.Int64Array `db:"roles"`
}
type ChannelRolesPermission ¶
type ChannelType ¶
type ChannelType int
const ( ChannelTypeGuild ChannelType = iota // Default text channel in guild ChannelTypeGuildVoice // Voice channel in guild ChannelTypeGuildCategory // Category channel in guild ChannelTypeDM // DM channel. Can't be created in Guild ChannelTypeGroupDM // Group DM channel. Can't be created in Guild' ChannelTypeThread // Thread channel )
type ChannelUserPermission ¶
type Discriminator ¶
type GroupDMChannel ¶
type GuildChannel ¶
type GuildChannelReadState ¶ added in v1.4.0
type GuildInvite ¶
type GuildInvite struct {
InviteCode string `db:"invite_code"`
InviteId int64 `db:"invite_id"`
GuildId int64 `db:"guild_id"`
AuthorId int64 `db:"author_id"`
CreatedAt time.Time `db:"created_at"`
ExpiresAt time.Time `db:"expires_at"`
}
GuildInvite represents an invite joined with its code and metadata
type MessageType ¶
type MessageType int
const ( MessageTypeSystem MessageType = iota MessageTypeChat MessageTypeReply )
type NotificationsType ¶ added in v1.4.0
type NotificationsType int
const ( NotificationsAll NotificationsType = iota NotificationsMentions NotificationsNone )
type Registration ¶
type UserRoles ¶ added in v1.4.0
type UserRoles struct {
UserId int64 `db:"user_id"`
Roles pq.Int64Array `db:"roles"`
}
type UserSettings ¶ added in v1.4.0
type UserSettings struct {
UserId int64 `db:"user_id"`
Settings json.RawMessage `db:"settings"`
Version int64 `db:"version"`
}
type UserSettingsAppearance ¶ added in v1.4.0
type UserSettingsData ¶ added in v1.4.0
type UserSettingsData struct {
Language string `json:"language"`
SelectedGuild int64 `json:"selected_guild"`
Appearance UserSettingsAppearance `json:"appearance"`
GuildFolders []UserSettingsGuildFolders `json:"guild_folders"`
Guilds []UserSettingsGuilds `json:"guilds"`
FavoriteGifs []string `json:"favorite_gifs"`
}
func (UserSettingsData) Validate ¶ added in v1.4.0
func (s UserSettingsData) Validate() error
type UserSettingsGuildFolders ¶ added in v1.4.0
type UserSettingsGuilds ¶ added in v1.4.0
type UserSettingsGuilds struct {
GuildId int64 `json:"guild_id"`
Position int64 `json:"position"`
SelectedChannel int64 `json:"selected_channel"`
Notifications UserSettingsNotifications `json:"notifications"`
ReadStates []GuildChannelReadState `json:"read_states"`
}
func (UserSettingsGuilds) Validate ¶ added in v1.4.0
func (g UserSettingsGuilds) Validate() error
type UserSettingsNotifications ¶ added in v1.4.0
type UserSettingsNotifications struct {
Muted bool `json:"muted"`
Notifications NotificationsType `json:"notifications"`
Global bool `json:"global"`
Roles bool `json:"roles"`
}
func (UserSettingsNotifications) Validate ¶ added in v1.4.0
func (n UserSettingsNotifications) Validate() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.