ningen

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmojiString added in v0.0.4

func EmojiString(e *discord.Emoji) string

Types

type GuildRequester

type GuildRequester interface {
	RequestGuildMembers(gateway.RequestGuildMembersData) error
	GuildSubscribe(gateway.GuildSubscribeData) error
}

type MemberList

type MemberList struct {
	ID          string
	MemberCount uint64
	OnlineCount uint64

	Groups []gateway.GuildMemberListGroup
	Items  []*gateway.GuildMemberListOpItem
	// contains filtered or unexported fields
}

func (*MemberList) Acquire

func (m *MemberList) Acquire() func()

type MemberListState

type MemberListState struct {

	// All mutex guarded
	OnOP   func(m *MemberList, guild discord.Snowflake, op gateway.GuildMemberListOp)
	OnSync func(m *MemberList, guild discord.Snowflake)
	// contains filtered or unexported fields
}

func NewMemberListState

func NewMemberListState(h handler.AddHandler) *MemberListState

func (*MemberListState) GetMemberList

func (m *MemberListState) GetMemberList(guild discord.Snowflake) *MemberList

type Presencer

type Presencer interface {
	Presence(guild, user discord.Snowflake) (*discord.Presence, error)
}

type State

type State struct {
	*ningen.State
	MemberList *MemberListState
	// contains filtered or unexported fields
}

func Connect

func Connect(token string, onReady func(s *State)) (*State, error)

func (*State) RequestMember

func (n *State) RequestMember(guildID, memID discord.Snowflake)

func (*State) SearchMember

func (n *State) SearchMember(guildID discord.Snowflake, prefix string)

func (*State) Subscribe

func (n *State) Subscribe(guildID discord.Snowflake, chID discord.Snowflake, chunk int)

Jump to

Keyboard shortcuts

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