Documentation ¶
Index ¶
- Variables
- func AddTeamPlaceholder(team Team) error
- func CreateRing(ringData Ring) error
- func DropPlayer(playerData *Player, teamData *Team) error
- func EditRing(id string, ringData Ring) error
- func HasManagePermission(userID string, team Team) bool
- func Init()
- func RecruitPlayer(playerData *Player, teamData *Team) error
- func SavePlayerData(playerData *Player) error
- func SaveTeamData(teamData *Team) error
- func UpdateTeamOptions() error
- type Player
- type PlayerInfo
- type PlayerRingData
- type Ring
- type Suspension
- type Team
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TeamOptions []*discordgo.ApplicationCommandOptionChoice
)
Functions ¶
func AddTeamPlaceholder ¶
func CreateRing ¶
CreateRing creates a ring. You must use the Ring struct to create the ring, unlike the other create functions as this one is small and simple.
func DropPlayer ¶
func EditRing ¶
EditRing edits the data of a ring. You must use the Ring struct to edit the data, unlike the other edit functions as this one is small and simple.
func HasManagePermission ¶
func RecruitPlayer ¶
func SavePlayerData ¶
func SaveTeamData ¶
func UpdateTeamOptions ¶
func UpdateTeamOptions() error
Types ¶
type Player ¶
type Player struct { ID string `bson:"_id"` TeamPlaying string `bson:"team_id"` Stars float32 `bson:"stars"` Contracted bool `bson:"contracted"` Suspension *Suspension `bson:"suspension"` Rings []PlayerRingData `bson:"rings"` }
func GetPlayerData ¶
func GetPlayersWithRing ¶
GetPlayersWithRing returns the players with a specific ring.
type PlayerInfo ¶
type PlayerRingData ¶
type PlayerRingData struct { RingID string `bson:"ring_id"` DateAwarded string `bson:"date_awarded"` }
func GetPlayerRings ¶
func GetPlayerRings(id string) ([]PlayerRingData, error)
GetPlayerRings returns the rings of a player.
type Ring ¶
type Ring struct { ID string `bson:"_id"` RoleID string `bson:"roleId"` Name string `bson:"name"` Desc string `bson:"desc"` }
TODO: implement discord invites for teams in teams.go and wherever else it's needed (i forgort lol)
func GetPlayerRingsData ¶
GetPlayerRingsData returns the data of the rings of a player.
func GetRingData ¶
GetRingData returns the data of a single ring. To get the data of multiple rings, use GetRingsData.
type Suspension ¶
type Team ¶
type Team struct { ID string `bson:"_id"` Name string `bson:"name"` Logo string `bson:"logo"` EmojiID string `bson:"emojiId"` Owner string `bson:"teamOwner"` Coaches []string `bson:"coach"` Players []PlayerInfo `bson:"players"` PlayerMax int `bson:"playerMax"` RoleID string `bson:"roleId"` Wins uint `bson:"wins"` Losses uint `bson:"losses"` MaxStars float32 `bson:"maxStars"` DiscordInvite string `bson:"discordInvite"` }
func GetAllTeams ¶
func GetTeamData ¶
Click to show internal directories.
Click to hide internal directories.