Documentation ¶
Index ¶
- Variables
- type AllianceHandler
- func (ah *AllianceHandler) AcceptInvite(s *discordgo.Session, inviteeID, allianceName string) error
- func (ah *AllianceHandler) AdminApproveInvite(s *discordgo.Session, allianceName string, inviteeID string) error
- func (ah *AllianceHandler) ApproveCreateRequest(requestName string, s *discordgo.Session, e *discordgo.InteractionCreate) (*data.Alliance, error)
- func (ah *AllianceHandler) CreateAllinaceRequest(allianceName string, requestorID string) error
- func (ah *AllianceHandler) DeclineRequest(allianceName string) error
- func (ah *AllianceHandler) DeleteAlliance(allianceName string, s *discordgo.Session) error
- func (ah *AllianceHandler) InvitePlayer(memberID string, inviteeID string, allianceName string) error
- func (ah *AllianceHandler) LeaveAlliance(currAlliance *data.Alliance, memberID string, s *discordgo.Session) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAllianceAlreadyExists = errors.New("alliance already exists") ErrCreateRequestAlreadyExists = errors.New("alliance request already exists") ErrInviteAlreadyExists = errors.New("alliance invite already exists") ErrMemberAlreadyExists = errors.New("alliance member already exists") ErrChannelAlreadyExists = errors.New("alliance channel already exists") ErrAlreadyAllianceMember = errors.New("user is already a member of an alliance") )
Already exists errors
View Source
var ( ErrAllianceNotFound = errors.New("alliance not found") ErrRequestNotFound = errors.New("alliance request not found") ErrInviteNotFound = errors.New("alliance invite not found") ErrMemberNotFound = errors.New("alliance member not found") )
Not found errors
View Source
var ( ErrAllianceMemberLimitExceeded = errors.New("alliance member limit exceeded") ErrInviteNotAccepted = errors.New("player has not accepted invite") )
Misc errors
Functions ¶
This section is empty.
Types ¶
type AllianceHandler ¶
type AllianceHandler struct {
// contains filtered or unexported fields
}
func InitAllianceHandler ¶
func InitAllianceHandler(models data.Models) *AllianceHandler
func (*AllianceHandler) AcceptInvite ¶
func (ah *AllianceHandler) AcceptInvite(s *discordgo.Session, inviteeID, allianceName string) error
func (*AllianceHandler) AdminApproveInvite ¶
func (*AllianceHandler) ApproveCreateRequest ¶
func (ah *AllianceHandler) ApproveCreateRequest(requestName string, s *discordgo.Session, e *discordgo.InteractionCreate) (*data.Alliance, error)
func (*AllianceHandler) CreateAllinaceRequest ¶
func (ah *AllianceHandler) CreateAllinaceRequest(allianceName string, requestorID string) error
func (*AllianceHandler) DeclineRequest ¶
func (ah *AllianceHandler) DeclineRequest(allianceName string) error
func (*AllianceHandler) DeleteAlliance ¶
func (ah *AllianceHandler) DeleteAlliance(allianceName string, s *discordgo.Session) error
func (*AllianceHandler) InvitePlayer ¶
func (ah *AllianceHandler) InvitePlayer(memberID string, inviteeID string, allianceName string) error
func (*AllianceHandler) LeaveAlliance ¶
Click to show internal directories.
Click to hide internal directories.