Documentation ¶
Index ¶
- type DiscordMatch
- type DiscordMatchService
- func (s *DiscordMatchService) AppendMembers(tchID string, dg_users []*dg.User) error
- func (s *DiscordMatchService) Create(tch *dg.Channel, owner *dg.User) (*DiscordMatch, error)
- func (s *DiscordMatchService) FilterAvailableVCh(chs []*dg.Channel) []*dg.Channel
- func (s *DiscordMatchService) GetMatchByTChID(tchID string) (*DiscordMatch, error)
- func (s *DiscordMatchService) GetTeam(tchID string) (Team1UserIDs []string, Team2UserIDs []string, err error)
- func (s *DiscordMatchService) IsListeningMessage(tchID, msgID string) bool
- func (s *DiscordMatchService) Remove(tchID string) error
- func (s *DiscordMatchService) SetListeningMessage(tchID string, msg *dg.Message) error
- func (s *DiscordMatchService) SetVCh(tchID string, vch *dg.Channel, team string) error
- func (s *DiscordMatchService) Shuffle(tchID string) error
- type DiscordUser
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscordMatch ¶
type DiscordMatch struct { Owner *dg.User Team1VCh *dg.Channel Team2VCh *dg.Channel MatchID int32 RecommendedChannel *dg.Channel ListeningMessage *dg.Message Status Status // contains filtered or unexported fields }
func (*DiscordMatch) GetGuildId ¶
func (m *DiscordMatch) GetGuildId() string
func (*DiscordMatch) GetRecommendedChannel ¶
func (m *DiscordMatch) GetRecommendedChannel() (*dg.Channel, error)
TODO: More strictly state management or more get method to nil check
type DiscordMatchService ¶
type DiscordMatchService struct {
// contains filtered or unexported fields
}
func NewDiscordMatchService ¶
func NewDiscordMatchService() *DiscordMatchService
func (*DiscordMatchService) AppendMembers ¶
func (s *DiscordMatchService) AppendMembers(tchID string, dg_users []*dg.User) error
func (*DiscordMatchService) Create ¶
func (s *DiscordMatchService) Create(tch *dg.Channel, owner *dg.User) (*DiscordMatch, error)
func (*DiscordMatchService) FilterAvailableVCh ¶
func (s *DiscordMatchService) FilterAvailableVCh(chs []*dg.Channel) []*dg.Channel
func (*DiscordMatchService) GetMatchByTChID ¶
func (s *DiscordMatchService) GetMatchByTChID(tchID string) (*DiscordMatch, error)
use cache if we need more performance (not map)
func (*DiscordMatchService) GetTeam ¶
func (s *DiscordMatchService) GetTeam(tchID string) (Team1UserIDs []string, Team2UserIDs []string, err error)
func (*DiscordMatchService) IsListeningMessage ¶
func (s *DiscordMatchService) IsListeningMessage(tchID, msgID string) bool
func (*DiscordMatchService) Remove ¶
func (s *DiscordMatchService) Remove(tchID string) error
func (*DiscordMatchService) SetListeningMessage ¶
func (s *DiscordMatchService) SetListeningMessage(tchID string, msg *dg.Message) error
func (*DiscordMatchService) Shuffle ¶
func (s *DiscordMatchService) Shuffle(tchID string) error
type DiscordUser ¶
TODO: Make service
Click to show internal directories.
Click to hide internal directories.