members

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MemberAvatarSize = 32

Variables

This section is empty.

Functions

func FilterHoistRoles

func FilterHoistRoles(roles []discord.Role) []discord.Role

func GetTopRole

func GetTopRole(roles []discord.Role) *discord.Role

func GetTopRoleID

func GetTopRoleID(
	ids []discord.Snowflake, roles map[discord.Snowflake]*discord.Role) *discord.Role

func MapRoles

func MapRoles(roles []discord.Role) map[discord.RoleID]*discord.Role

func SortRoles

func SortRoles(roles []discord.Role)

Types

type Container

type Container struct {
	*gtk.ListBox
	Rows []gtk.Widgetter
	// contains filtered or unexported fields
}

func New

func New(s *ningen.State) (m *Container)

func (*Container) Load added in v0.1.0

func (m *Container) Load(guildID discord.GuildID, chID discord.ChannelID)

LoadGuild is thread-safe.

type Member

type Member struct {
	*gtk.ListBoxRow
	User *user.Container

	// user
	ID discord.UserID
}

func NewMember

func NewMember(m discord.Member, p gateway.Presence, guild discord.Guild) *Member

func NewMemberUnavailable

func NewMemberUnavailable() *Member

type Section

type Section struct {
	*gtk.ListBoxRow
	Name  string
	Count uint64

	Label *gtk.Label
}

func NewSection

func NewSection(name string, count uint64) *Section

func (*Section) Update

func (s *Section) Update(name string, count uint64)

Jump to

Keyboard shortcuts

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