role

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Setting

type Setting func(*Settings)

Setting is a function that configures a guild role.

func WithColor

func WithColor(hexCode int) Setting

WithColor sets the color of guild a role. It accepts hexadecimal value.

func WithHoist

func WithHoist(yes bool) Setting

WithHoist sets whether this guild role is hoisted.

func WithMentionable

func WithMentionable(yes bool) Setting

WithMentionable sets whether this guild role is mentionable by others.

func WithName

func WithName(name string) Setting

WithName sets the name of guild a role.

func WithPermissions

func WithPermissions(perm int) Setting

WithPermissions sets the permissions of guild a role.

type Settings

type Settings struct {
	Name        *optional.String `json:"name,omitempty"`
	Permissions *optional.Int    `json:"permissions,omitempty"`
	Color       *optional.Int    `json:"color,omitempty"`
	Hoist       *optional.Bool   `json:"hoist,omitempty"`
	Mentionable *optional.Bool   `json:"mentionable,omitempty"`
}

Settings describes how to modify a guild role. All fields are optional.

func NewSettings

func NewSettings(opts ...Setting) *Settings

NewSettings returns new Settings to modify a a guild role.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL