Documentation ¶
Index ¶
- type Mention
- type Setting
- func WithBitrate(bitrate int) Setting
- func WithNSFW(yes bool) Setting
- func WithName(name string) Setting
- func WithParent(id string) Setting
- func WithPermissions(perms []permission.Overwrite) Setting
- func WithPosition(pos int) Setting
- func WithRateLimitPerUser(rateLimit int) Setting
- func WithTopic(topic string) Setting
- func WithType(t Type) Setting
- func WithUserLimit(limit int) Setting
- type Settings
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mention ¶ added in v0.14.0
type Mention struct { ID string `json:"id"` GuildID string `json:"guild_id"` Type Type `json:"type"` Name string `json:"name"` }
Mention represents a channel mention.
type Setting ¶
type Setting func(*Settings)
Setting is a function that configures a channel.
func WithBitrate ¶
WithBitrate sets the bit rate of a channel (audio only).
func WithParent ¶
WithParent sets the parent ID channel of a channel.
func WithPermissions ¶
func WithPermissions(perms []permission.Overwrite) Setting
WithPermissions sets the permission overwrites of a channel. Pass an empty array to remove all permission overwrites.
func WithRateLimitPerUser ¶
WithRateLimitPerUser sets the rate limit per user (text only).
func WithUserLimit ¶
WithUserLimit sets the user limit of a channel (audio only).
type Settings ¶
type Settings struct { Name *optional.String `json:"name,omitempty"` // 2-100 characters. Type *optional.Int `json:"type"` Topic *optional.String `json:"topic"` // 0-1000 characters. Bitrate *optional.Int `json:"bitrate,omitempty"` UserLimit *optional.Int `json:"user_limit,omitempty"` // RateLimitPerUser is the amount of seconds a user has to wait before sending // another message (0-120); bots, as well as users with the permission // 'manage_messages' or 'manage_channel', are unaffected. RateLimitPerUser *optional.Int `json:"rate_limit_per_user"` // Sorting position of the channel. Position *optional.Int `json:"position"` Permissions []permission.Overwrite `json:"permission_overwrites,omitempty"` ParentID *optional.String `json:"parent_id,omitempty"` NSFW *optional.Bool `json:"nsfw,omitempty"` }
Settings describes a channel creation or update.
func NewSettings ¶
NewSettings returns new Settings to modify a a channel.
Click to show internal directories.
Click to hide internal directories.