member

package
v0.0.0-...-8fd61c5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: BSD-3-Clause Imports: 3 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedMember

type CachedMember struct {
	Nick         string     `json:"nick"`
	Roles        []uint64   `json:"roles"`
	JoinedAt     time.Time  `json:"joined_at"`
	PremiumSince *time.Time `json:"premium_since"` // when the user started boosting the guild
	Deaf         bool       `json:"deaf"`
	Mute         bool       `json:"mute"`
}

func (*CachedMember) ToMember

func (m *CachedMember) ToMember(user user.User) Member

type Member

type Member struct {
	User         user.User               `json:"user"`
	Nick         string                  `json:"nick"`
	Roles        utils.Uint64StringSlice `json:"roles"`
	JoinedAt     time.Time               `json:"joined_at"`
	PremiumSince *time.Time              `json:"premium_since"` // when the user started boosting the guild
	Deaf         bool                    `json:"deaf"`
	Mute         bool                    `json:"mute"`
	Permissions  uint64                  `json:"permissions,string"`
}

func (*Member) HasRole

func (m *Member) HasRole(roleId uint64) bool

func (*Member) ToCachedMember

func (m *Member) ToCachedMember() CachedMember

Jump to

Keyboard shortcuts

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