Skip to content
/ api Public

feat: tournament Discord voice channel management#127

Open
Flegma wants to merge 4 commits intomainfrom
feat/discord-voice
Open

feat: tournament Discord voice channel management#127
Flegma wants to merge 4 commits intomainfrom
feat/discord-voice

Conversation

@Flegma
Copy link
Contributor

@Flegma Flegma commented Mar 13, 2026

Summary

  • Add automatic Discord voice channel management for tournaments
  • When a tournament goes Live, creates a muted "Ready Room" voice channel under a tournament category
  • When matches reach WaitingForCheckIn (also on Veto and Live if admin skips match process), creates per-team voice channels with descriptive names (e.g. "Fnatic - Grand Finals") and moves players from the ready room
  • Players without linked Discord accounts get a warning in the match thread
  • Cleanup on match completion (players moved back to ready room, match channels deleted) and tournament completion (ready room + category deleted)
  • New tournament settings: discord_guild_id (Discord Server ID) and discord_voice_enabled (toggle)
  • Database migration, Hasura event trigger on tournament status changes, and metadata permissions updates

Changes

  • New: DiscordTournamentVoiceService + module for ready room, match channels, player movement, cleanup
  • New: getBracketRoundLabel utility (ports frontend round label logic with English strings for Discord)
  • New: DB migration adding discord_guild_id and discord_voice_enabled to tournaments
  • New: Hasura tournament_events event trigger on status column
  • Modified: DiscordBotVoiceChannelsService — optional channelName param on createMatchVoiceChannel()
  • Modified: TournamentsControllertournament_events handler (Live → ready room, terminal → cleanup)
  • Modified: MatchesController — tournament voice hooks on WaitingForCheckIn
  • Modified: Module imports for TournamentsModule and MatchesModule

Companion PR

Test plan

  • Run migration, verify discord_guild_id and discord_voice_enabled columns exist
  • Verify tournament status changes fire the tournament_events webhook
  • Set discord_guild_id and enable voice on a tournament, go Live → verify category + muted ready room created
  • Create a tournament match → verify two named voice channels appear under category
  • Verify players with linked Discord are moved at WaitingForCheckIn
  • Verify unlinked player warning in match thread
  • Finish/cancel match → verify players moved back, match channels deleted
  • Finish/cancel tournament → verify ready room + category deleted
  • Verify nothing happens when discord_voice_enabled is false

Add automatic voice channel creation and player movement for tournament
matches. When a tournament goes Live, a muted ready room is created.
When matches reach WaitingForCheckIn, per-team voice channels are created
with descriptive names (e.g. "Fnatic - Grand Finals") and players are
moved from the ready room. Cleanup happens on match/tournament completion.
@Flegma Flegma changed the title feat: tournament Discord voice channel management WIP: feat: tournament Discord voice channel management Mar 13, 2026
Flegma added 2 commits March 13, 2026 13:46
…ipped check-in

Adds Veto and Live status triggers for voice channel creation so
tournaments that skip check-in still get Discord voice channels.
A duplicate guard in createMatchVoiceChannels prevents double creation
when multiple triggers fire in sequence.
@Flegma Flegma changed the title WIP: feat: tournament Discord voice channel management feat: tournament Discord voice channel management Mar 13, 2026
@Flegma Flegma requested a review from lukepolo March 13, 2026 13:16
- Increase tournament voice cache TTL from 7 to 30 days to prevent
  channel orphaning for long-running tournaments
- Cache brand name query in getArchiveCategoryName for 1 hour to
  avoid redundant Hasura queries on every call
- Remove redundant ready room deletion in removeTournamentVoice since
  the category children loop already handles it
- Remove unreachable SingleElimination branch in getBracketRoundLabel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant