alliance

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 (ah *AllianceHandler) AdminApproveInvite(s *discordgo.Session, allianceName string, inviteeID string) error

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

func (ah *AllianceHandler) LeaveAlliance(currAlliance *data.Alliance, memberID string, s *discordgo.Session) error

Jump to

Keyboard shortcuts

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