Example #1
0
func checkIfInvited(characters []*models.Player, guild *models.Guild) bool {
	for _, character := range characters {
		if models.GetGuildInvitation(character.Id, guild.Id) {
			return true
		}
	}
	return false
}
Example #2
0
func getInvitedPlayers(characters []*models.Player, guild *models.Guild) []string {
	names := []string{}
	for _, character := range characters {
		if models.GetGuildInvitation(character.Id, guild.Id) {
			names = append(names, character.Name)
		}
	}
	return names
}