discord

package
v0.0.0-...-4a96510 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChWithVss

type ChWithVss struct {
	Ch  *dg.Channel
	Vss []*dg.VoiceState
}

type Session

type Session struct {
	*dg.Session
	*Utility
}

func New

func New(s *dg.Session) *Session

func (*Session) ChannelUnsafe

func (s *Session) ChannelUnsafe(chID string) string

func (Session) GetSameGuildChannels

func (s Session) GetSameGuildChannels(chID string) ([]*dg.Channel, error)

func (*Session) IsMentionedMessage

func (s *Session) IsMentionedMessage(m *dg.MessageCreate) bool

type Utility

type Utility struct {
}

func (*Utility) Channels2IDs

func (u *Utility) Channels2IDs(chs []*dg.Channel) []string

func (*Utility) Channels2Names

func (u *Utility) Channels2Names(chs []*dg.Channel) []string

func (*Utility) FilterChannelsByType

func (u *Utility) FilterChannelsByType(
	chs []*dg.Channel,
	tp dg.ChannelType,
) []*dg.Channel

func (*Utility) GetMostPeopleVCh

func (u *Utility) GetMostPeopleVCh(vchs []*dg.Channel, vss []*dg.VoiceState) (*dg.Channel, error)

func (*Utility) PackChannelsAndVoiceStates

func (u *Utility) PackChannelsAndVoiceStates(vchs []*dg.Channel, vss []*dg.VoiceState) ([]*ChWithVss, error)

Jump to

Keyboard shortcuts

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