Documentation ¶
Index ¶
- type Embed
- type MemberSetting
- type MemberSettings
- type Setting
- func WithAfkChannel(id string) Setting
- func WithAfkTimeout(sec int) Setting
- func WithDefaultMessageNotifications(lvl int) Setting
- func WithExplicitContentFilter(lvl int) Setting
- func WithIcon(icon string) Setting
- func WithName(name string) Setting
- func WithOwner(id string) Setting
- func WithRegion(region string) Setting
- func WithSplash(splash string) Setting
- func WithSystemChannel(id string) Setting
- func WithVerificationLevel(lvl int) Setting
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemberSetting ¶
type MemberSetting func(*MemberSettings)
MemberSetting is a function that configures a guild member.
func WithChannelID ¶
func WithChannelID(id string) MemberSetting
WithChannelID sets the channel id of a guild member (if connected to voice).
func WithDeaf ¶
func WithDeaf(yes bool) MemberSetting
WithDeaf sets whether a guild member is deafen.
func WithMute ¶
func WithMute(yes bool) MemberSetting
WithMute sets whether a guild member is muted.
func WithRoles ¶
func WithRoles(roleIDs []string) MemberSetting
WithRoles sets the roles of a guild member.
type MemberSettings ¶
type MemberSettings struct { Nick *optional.String `json:"nick,omitempty"` Roles *optional.StringSlice `json:"roles,omitempty"` Mute *optional.Bool `json:"mute,omitempty"` Deaf *optional.Bool `json:"deaf,omitempty"` // ID of channel to move user to (if they are connected to voice). ChannelID *optional.String `json:"channel_id,omitempty"` }
MemberSettings are the settings of a guild member, all fields are optional and only those explicitly set will be modified.
func NewMemberSettings ¶
func NewMemberSettings(opts ...MemberSetting) *MemberSettings
NewMemberSettings returns new Settings to modify a a guild member.
type Setting ¶
type Setting func(*Settings)
Setting is a function that configures a guild.
func WithAfkChannel ¶
WithAfkChannel sets the AFK channel ID of a guild.
func WithAfkTimeout ¶
WithAfkTimeout sets the AFK timeout of a guild.
func WithDefaultMessageNotifications ¶
WithDefaultMessageNotifications sets the default notification level of a guild.
- 0 for all messages
- 1 for mentions only
func WithExplicitContentFilter ¶
WithExplicitContentFilter sets the explicit content filter of a guild.
- 0 for disabled
- 1 for member without roles
- 2 for all members
func WithOwner ¶
WithOwner sets the owner ID of a guild (must be the guild owner to for this to have effect).
func WithSplash ¶
WithSplash sets the Guild splash (VIP only) which is a base64 encoded 128x128 image.
func WithSystemChannel ¶
WithSystemChannel sets the id of the channel to which system messages are sent.
func WithVerificationLevel ¶
WithVerificationLevel sets the verification level of a guild.
- 0 for none (unrestricted)
- 1 for low (must have verified email on account)
- 2 for medium (must be registered on Discord for longer than 5 minutes)
- 3 for high (must be a member of the server for longer than 10 minutes)
- 4 for very high (must have a verified phone number)
type Settings ¶
type Settings struct { Name *optional.String `json:"name,omitempty"` Region *optional.String `json:"region,omitempty"` VerificationLevel *optional.Int `json:"verification_level,omitempty"` DefaultMessageNotifications *optional.Int `json:"default_message_notifications,omitempty"` ExplicitContentFilter *optional.Int `json:"explicit_content_filter,omitempty"` AfkChannelID *optional.String `json:"afk_channel_id,omitempty"` AfkTimeout *optional.Int `json:"afk_timeout,omitempty"` Icon *optional.String `json:"icon,omitempty"` OwnerID *optional.String `json:"owner_id,omitempty"` Splash *optional.String `json:"splash,omitempty"` SystemChannelID *optional.String `json:"system_channel_id,omitempty"` }
Settings are the settings of a guild, all fields are optional and only those explicitly set will be modified.
func NewSettings ¶
NewSettings returns new Settings to modify a a guild.