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
| Field | Type | Description |
|---|---|---|
action | string | Always "TEAMS_CREATED" |
queue | string | The name/identifier of the queue |
channel | string | Discord channel ID where the event occurred |
guild | string | Discord guild (server) ID |
match_number | number | Unique match number/ID |
teams | Player[][] | 2D array of teams, each containing Player objects |
match_details | object | Map, mode, and other match settings |
lobby_details | string | Lobby 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_numset 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:
| Field | Type | Description |
|---|---|---|
map | string | Selected map name |
mode | string | Game mode |
server | string | Server region |
| Additional fields | varies | Custom server-specific settings |
note
The exact structure of match_details depends on your queue configuration.
Match Flow
- MATCH_STARTED - Match validation begins
- TEAMS_CREATED ← You are here
- MATCH_COMPLETED or MATCH_CANCELLED - Match ends
Related Events
- MATCH_STARTED - Match validation begins
- MATCH_COMPLETED - Match finishes
- SUBSTITUTION - Player is substituted