Common¶
-
async
check_faction
(ctx, args)¶ Check if args contain a valid faction, if not display an error message
- Parameters
ctx – Context used for displaying messages
args – args to be examined
- Returns
Message that was sent (None if no error message)
-
switch_turn
(process, team)¶ Change the team who can pick.
- Parameters
process – Process object calling this function
team – The team who is currently picking
- Returns
Next team to pick
-
async
get_substitute
(match, subbed, player=None)¶ Get a substitute player from lobby, return it
- Parameters
subbed – Player who will be subbed
match – Match calling this function
force_player – Use this argument to force the player used for the sub. If None, pick a player from the lobby
- Returns
Player found for subbing, return None if no player available
-
async
ping_sub_in_lobby
(match, new_player, was_lobbied)¶
-
async
after_pick_sub
(match, subbed, force_player, clean_subbed=True)¶ Substitute a player by another one picked at random in the lobby.
- Parameters
clean_subbed – Specify if subbed player should be cleaned
ctx – Context used for displaying messages
match – Match calling this function
subbed – Player player to be subbed
- Returns
Nothing
-
get_check_captain
(ctx, match, check_turn=True)¶ Test if the player is in position to issue a match command Returns the player object if yes, None if not