Documentation
¶
Index ¶
- type Account
- type Ban
- type CachedGuild
- type CachedRole
- type CachedVoiceState
- type DefaultMessageNotificationLevel
- type ExplicitContentFilterLevel
- type Guild
- type GuildEmbed
- type GuildFeature
- type GuildPreview
- type GuildWidget
- type PremiumTier
- type Role
- type RoleTags
- type VerificationLevel
- type VoiceRegion
- type VoiceState
- type Webhook
- type WebhookType
- type WelcomeScreen
- type WelcomeScreenChannel
- type WidgetStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedGuild ¶
type CachedGuild struct {
Id uint64 `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Splash string `json:"splash"`
Owner bool `json:"owner"`
OwnerId uint64 `json:"owner_id"`
Permissions uint64 `json:"permissions"`
Region string `json:"region"`
AfkChannelId objects.NullableSnowflake `json:"afk_channel_id"`
AfkTimeout int `json:"afk_timeout"`
VerificationLevel int `json:"verification_level"`
DefaultMessageNotifications int `json:"default_message_notifications"`
ExplicitContentFilter int `json:"explicit_content_filter"`
Roles []uint64 `json:"-"`
Emojis []uint64 `json:"-"`
Features []GuildFeature `json:"features"`
MfaLevel int `json:"mfa_level"`
ApplicationId objects.NullableSnowflake `json:"application_id"`
WidgetEnabled bool `json:"widget_enabled"`
WidgetChannelId objects.NullableSnowflake `json:"widget_channel_id"`
SystemChannelId objects.NullableSnowflake `json:"system_channel_id"`
SystemChannelFlags uint16 `json:"system_channel_flags"`
RulesChannelId objects.NullableSnowflake `json:"rules_channel_id,omitempty"`
JoinedAt time.Time `json:"joined_at"`
Large bool `json:"large"`
MemberCount int `json:"member_count"`
Channels []uint64 `json:"-"`
Presences []uint64 `json:"-"`
MaxPresences int `json:"max_presences"`
MaxMembers int `json:"max_members"`
VanityUrlCode string `json:"vanity_url_code"`
Description string `json:"description"`
Banner string `json:"banner"`
PremiumTier PremiumTier `json:"premium_tier"`
PremiumSubscriptionCount int `json:"premium_subscription_count"`
PreferredLocale string `json:"preferred_locale"`
PublicUpdatesChannelId objects.NullableSnowflake `json:"public_updates_channel_id"`
MaxVideoChannelUsers int `json:"max_video_channel_users"`
}
func (*CachedGuild) ToGuild ¶
func (g *CachedGuild) ToGuild(guildId uint64) Guild
type CachedRole ¶
type CachedRole struct {
GuildId uint64 `json:"-"` // Don't include in postgres
Name string `json:"name"`
Color int `json:"color"`
Hoist bool `json:"hoist"`
Position int `json:"position"`
Permissions uint64 `json:"permissions,string"`
Managed bool `json:"managed"`
Mentionable bool `json:"mentionable"`
}
func (*CachedRole) ToRole ¶
func (r *CachedRole) ToRole(roleId uint64) Role
type CachedVoiceState ¶
type CachedVoiceState struct {
ChannelId uint64 `json:"channel_id"`
SessionId string `json:"session_id"`
Deaf bool `json:"deaf"`
Mute bool `json:"mute"`
SelfDeaf bool `json:"self_deaf"`
SelfMute bool `json:"self_mute"`
Suppress bool `json:"suppress"`
}
func (*CachedVoiceState) ToVoiceState ¶
func (s *CachedVoiceState) ToVoiceState(guildId uint64, m member.Member) VoiceState
type DefaultMessageNotificationLevel ¶
type DefaultMessageNotificationLevel int
const ( DefaultMessageNotificationLevelAllMessages DefaultMessageNotificationLevel = 0 DefaultMessageNotificationLevelOnlyMengions DefaultMessageNotificationLevel = 1 )
type ExplicitContentFilterLevel ¶
type ExplicitContentFilterLevel int
const ( DISABLED ExplicitContentFilterLevel = 0 MEMBERS_WITHOUT_ROLES ExplicitContentFilterLevel = 1 ALL_MEMBERS ExplicitContentFilterLevel = 2 )
type Guild ¶
type Guild struct {
Id uint64 `json:"id,string"`
Name string `json:"name"`
Icon string `json:"icon"`
Splash string `json:"splash"`
Owner bool `json:"owner"`
OwnerId uint64 `json:"owner_id,string"`
Permissions uint64 `json:"permissions,string"`
Region string `json:"region"`
AfkChannelId objects.NullableSnowflake `json:"afk_channel_id"`
AfkTimeout int `json:"afk_timeout"`
VerificationLevel int `json:"verification_level"`
DefaultMessageNotifications int `json:"default_message_notifications"`
ExplicitContentFilter int `json:"explicit_content_filter"`
Roles []Role `json:"roles"`
Emojis []emoji.Emoji `json:"emojis"`
Features []GuildFeature `json:"features"`
MfaLevel int `json:"mfa_level"`
ApplicationId objects.NullableSnowflake `json:"application_id"`
WidgetEnabled bool `json:"widget_enabled"`
WidgetChannelId objects.NullableSnowflake `json:"widget_channel_id"`
SystemChannelId objects.NullableSnowflake `json:"system_channel_id"`
SystemChannelFlags uint16 `json:"system_channel_flags"`
RulesChannelId objects.NullableSnowflake `json:"rules_channel_id,omitempty"`
JoinedAt time.Time `json:"joined_at"`
Large bool `json:"large"`
MemberCount int `json:"member_count"`
VoiceStates []VoiceState `json:"voice_state"`
Members []member.Member `json:"members"`
Channels []channel.Channel `json:"channels"`
Threads []channel.Channel `json:"threads"`
MaxPresences int `json:"max_presences"`
MaxMembers int `json:"max_members"`
VanityUrlCode string `json:"vanity_url_code"`
Description string `json:"description"`
Banner string `json:"banner"`
PremiumTier PremiumTier `json:"premium_tier"`
PremiumSubscriptionCount int `json:"premium_subscription_count"`
PreferredLocale string `json:"preferred_locale"`
PublicUpdatesChannelId objects.NullableSnowflake `json:"public_updates_channel_id"`
MaxVideoChannelUsers int `json:"max_video_channel_users"`
ApproximateMemberCount int `json:"approximate_member_count"` // Returned on GET /guild/:id
ApproximatePresenceCount int `json:"approximate_presence_count"` // Returned on GET /guild/:id
WelcomeScreen WelcomeScreen `json:"welcome_screen"`
Nsfw bool `json:"nsfw"`
}
func (*Guild) ToCachedGuild ¶
func (g *Guild) ToCachedGuild() (cached CachedGuild)
type GuildEmbed ¶
type GuildFeature ¶
type GuildFeature string
const ( GuildFeatureInviteSplash GuildFeature = "INVITE_SPLASH" GuildFeatureVipRegions GuildFeature = "VIP_REGIONS" // guild has access to set 384kbps bitrate in voice (previously VIP voice servers) GuildFeatureVanityUrl GuildFeature = "VANITY_URL" GuildFeatureVerified GuildFeature = "VERIFIED" GuildFeaturePartnered GuildFeature = "PARTNERED" GuildFeaturePublic GuildFeature = "PUBLIC" GuildFeatureCommerce GuildFeature = "COMMERCE" GuildFeatureNews GuildFeature = "NEWS" GuildFeatureDiscoverable GuildFeature = "DISCOVERABLE" GuildFeatureFeaturable GuildFeature = "FEATURABLE" GuildFeatureBanner GuildFeature = "BANNER" GuildFeaturePublicDisabled GuildFeature = "PUBLIC_DISABLED" )
type GuildPreview ¶
type GuildPreview struct {
Id uint64 `json:"id,string"`
Name string `json:"name"`
Icon string `json:"icon"`
Splash string `json:"splash"`
DiscoverySplash string `json:"discovery_splash"`
Emojis []emoji.Emoji `json:"emojis"`
Features []GuildFeature `json:"features"`
ApproximateMemberCount int `json:"approximate_member_count"`
ApproximatePresenceCount int `json:"approximate_presence_count"`
Description string `json:"description"`
}
type GuildWidget ¶
type PremiumTier ¶
type PremiumTier int
const ( PremiumTierNone PremiumTier = iota PremiumTier1 PremiumTier2 PremiumTier3 )
type Role ¶
type Role struct {
Id uint64 `json:"id,string"`
Name string `json:"name"`
Color int `json:"color"`
Hoist bool `json:"hoist"`
Position int `json:"position"`
Permissions uint64 `json:"permissions,string"`
Managed bool `json:"managed"`
Mentionable bool `json:"mentionable"`
Tags RoleTags `json:"tags"`
}
func (*Role) ToCachedRole ¶
func (r *Role) ToCachedRole(guildId uint64) CachedRole
type VerificationLevel ¶
type VerificationLevel int
const ( NONE VerificationLevel = 0 LOW VerificationLevel = 1 MEDIUM VerificationLevel = 2 HIGH VerificationLevel = 3 VERY_HIGH VerificationLevel = 4 )
type VoiceRegion ¶
type VoiceState ¶
type VoiceState struct {
GuildId uint64 `json:"guild_id,string"`
ChannelId uint64 `json:"channel_id,string"`
UserId uint64 `json:"user_id,string"`
Member member.Member `json:"member"`
SessionId string `json:"session_id"`
Deaf bool `json:"deaf"`
Mute bool `json:"mute"`
SelfDeaf bool `json:"self_deaf"`
SelfMute bool `json:"self_mute"`
Suppress bool `json:"suppress"`
}
func (*VoiceState) ToCachedVoiceState ¶
func (s *VoiceState) ToCachedVoiceState() CachedVoiceState
type Webhook ¶
type Webhook struct {
Id uint64 `json:"id,string"`
Type WebhookType `json:"type"`
GuildId uint64 `json:"guild_id,string,omitempty"`
ChannelId uint64 `json:"channel_id,string"`
User user.User `json:"user"`
Name string `json:"name,omitempty"`
Avatar string `json:"avatar,omitempty"`
Token string `json:"token,omitempty"`
ApplicationId objects.NullableSnowflake `json:"application_id"`
}
type WebhookType ¶
type WebhookType int
const ( WebhookTypeIncoming WebhookType = 1 WebhookTypeChannelFollower WebhookType = 2 )
type WelcomeScreen ¶
type WelcomeScreen struct {
Description string `json:"description"`
WelcomeChannels []WelcomeScreenChannel `json:"welcome_channels"`
}
type WelcomeScreenChannel ¶
type WelcomeScreenChannel struct {
ChannelId uint64 `json:"channel_id,string"`
Description string `json:"description"`
EmojiId objects.NullableSnowflake `json:"emoji_id"`
EmojiName *string `json:"emoji_name"`
}
type WidgetStyle ¶
type WidgetStyle string
const ( WidgetStyleShield WidgetStyle = "shield" WidgetStyleBanner1 WidgetStyle = "banner1" WidgetStyleBanner2 WidgetStyle = "banner2" WidgetStyleBanner3 WidgetStyle = "banner3" WidgetStyleBanner4 WidgetStyle = "banner4" )
Source Files
¶
- account.go
- ban.go
- cachedguild.go
- cachedrole.go
- cachedvoicestate.go
- defaultmessagenotificationlevel.go
- explicitcontentfilterlevel.go
- guild.go
- guildembed.go
- guildfeature.go
- guildpreview.go
- guildwidget.go
- premiumtier.go
- role.go
- verificationlevel.go
- voiceregion.go
- voicestate.go
- webhook.go
- webhooktype.go
- welcomescreen.go
- widgetstyle.go
Click to show internal directories.
Click to hide internal directories.