Players

Contains player classes

exception CharNotFound(char)

Bases: Exception

exception CharInvalidWorld(char)

Bases: Exception

exception CharAlreadyExists(char, p)

Bases: Exception

exception CharMissingFaction(faction)

Bases: Exception

class Player(p_id, name)

Bases: object

Basic player class, every registered user matches a Player object contained in the dictionary

classmethod get(p_id)
remove()
classmethod get_all_players_list()
classmethod name_check_add(p)
classmethod name_check_remove(p)
classmethod new_from_data(data)
get_data()
async db_update(arg)
property active
property name
async change_name(new_name)
property timeout
cheat_name(name)
property is_timeout
property is_notify
property is_lobbied
property lobby_stamp
property stats
property id
property mention
property ig_names
property ig_ids
property is_registered
property match
property has_own_account
property accounts_flipped
update_role()
role_task

A background task helper that abstracts the loop and reconnection logic for you.

The main interface to create this is through loop().

on_lobby_leave()
reset_lobby_timestamp()
on_lobby_add()
on_player_clean()
on_picked(active)
async on_match_selected(m)
copy_ig_info(player)
async register(char_list: list)bool

Register the player with char_list.

Parameters

char_list – List of character names to be added.

Returns

Whether there was an update in the player profile.

Raise

UnexpectedError, when something unexpected happens.

Raise

CharNotFound, when a character name is not found in the API.

Raise

CharInvalidWorld, when a character doesn’t belongs to Jaeger.

Raise

CharAlreadyExists, when a character is already registered by another player

Raise

CharMissingFaction, when no character was provided for one of the faction.

class ActivePlayer(player, team)

Bases: object

ActivePlayer class, with more data than Player class, for when match is happening

property player_score
property is_benched
property is_captain
property is_playing
property name
property id
property has_own_account
property unique_usages
property mention
property faction
property ig_id
property ig_name
property account
property team
property match
bench(bench)
clean()
change_team(team)
on_team_ready(ready)
on_match_starting()
async accept_account()
class TeamCaptain(*args)

Bases: classes.players.ActivePlayer

Team Captain variant of the active player

property is_captain
property is_turn