Skip to main content

TEAMS_CREATED

Triggered when teams are finalized and the match is ready to begin.

Example Payload

{
"action": "TEAMS_CREATED",
"queue": "valorant",
"channel": "1234567890123456789",
"guild": "9876543210987654321",
"match_number": 42,
"teams": [
[
{
"name": "Player1#1234",
"id": "111222333444555666",
"mmr": 1500,
"role": "Duelist",
"team_num": 0,
"top_role_index": 0,
"ign": "PlayerIGN1",
"timestamp": 1707523200.0,
"pulled_from": null
},
{
"name": "Player2#5678",
"id": "222333444555666777",
"mmr": 1450,
"role": "Controller",
"team_num": 0,
"top_role_index": 1,
"ign": "PlayerIGN2",
"timestamp": 1707523250.0,
"pulled_from": null
}
],
[
{
"name": "Player3#9012",
"id": "333444555666777888",
"mmr": 1480,
"role": "Sentinel",
"team_num": 1,
"top_role_index": 2,
"ign": "PlayerIGN3",
"timestamp": 1707523300.0,
"pulled_from": null
},
{
"name": "Player4#3456",
"id": "444555666777888999",
"mmr": 1470,
"role": "Initiator",
"team_num": 1,
"top_role_index": 3,
"ign": "PlayerIGN4",
"timestamp": 1707523350.0,
"pulled_from": null
}
]
],
"match_details": {
"map": "Ascent",
"mode": "Competitive",
"server": "US West"
},
"lobby_details": "Join custom match with code: ABC123"
}

Payload Fields

FieldTypeDescription
actionstringAlways "TEAMS_CREATED"
queuestringThe name/identifier of the queue
channelstringDiscord channel ID where the event occurred
guildstringDiscord guild (server) ID
match_numbernumberUnique match number/ID
teamsPlayer[][]2D array of teams, each containing Player objects
match_detailsobjectMap, mode, and other match settings
lobby_detailsstringLobby information or join instructions

Teams Structure

The teams field is a 2D array where:

  • Each element is an array representing a team
  • Team indices start at 0 (Team 0, Team 1, etc.)
  • Each player object has team_num set to their team index

When This Event Fires

This webhook is sent when:

  • Teams have been balanced and finalized
  • Map/mode selection is complete
  • The match is ready for players to join
tip

This is the ideal time to send match details to external systems, as all match information is available.

Use Cases

  • Display team compositions on dashboards
  • Send match details to game servers
  • Notify players of their team assignments
  • Record team compositions for analytics
  • Generate match preview images
  • Start match timers

Implementation Example

def handle_teams_created(data):
match_id = data['match_number']
teams = data['teams']
match_details = data['match_details']

print(f"Match #{match_id} teams created")
print(f"Map: {match_details.get('map', 'N/A')}")

# Calculate team MMR averages
for i, team in enumerate(teams):
avg_mmr = sum(p['mmr'] for p in team) / len(team)
print(f"Team {i} avg MMR: {avg_mmr:.1f}")
print(f"Team {i} players: {[p['name'] for p in team]}")

# Example: Send to Discord webhook
send_match_notification(
match_id=match_id,
teams=teams,
details=match_details,
lobby=data['lobby_details']
)

Match Details Object

The match_details object may contain:

FieldTypeDescription
mapstringSelected map name
modestringGame mode
serverstringServer region
Additional fieldsvariesCustom server-specific settings
note

The exact structure of match_details depends on your queue configuration.

Match Flow

  1. MATCH_STARTED - Match validation begins
  2. TEAMS_CREATED ← You are here
  3. MATCH_COMPLETED or MATCH_CANCELLED - Match ends