File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1501,6 +1501,15 @@ export async function updateMatchCountChannel(): Promise<void> {
15011501 const activeMatches = await getActiveMatches ( )
15021502 const activeMatchCount = activeMatches . length || 0
15031503
1504+ // hard coded ids for the two ranked game modes. will change if queues are deleted and re-created
1505+ const standardId = 1
1506+ const legacyId = 7
1507+
1508+ const standardCount =
1509+ activeMatches . filter ( ( m ) => m . queue_id === standardId ) . length || 0
1510+ const legacyCount =
1511+ activeMatches . filter ( ( m ) => m . queue_id === legacyId ) . length || 0
1512+
15041513 // Get match count channel ID from settings
15051514 const settingsRes = await pool . query (
15061515 `SELECT match_count_channel_id FROM settings WHERE singleton = true` ,
@@ -1517,7 +1526,7 @@ export async function updateMatchCountChannel(): Promise<void> {
15171526 if ( channel && channel . type === ChannelType . GuildVoice ) {
15181527 await channel
15191528 . setName (
1520- `${ activeMatchCount } Active Match${ activeMatchCount === 1 ? '' : 'es' } ` ,
1529+ `${ activeMatchCount } Active Match${ activeMatchCount === 1 ? '' : 'es' } ( ${ standardCount } : ${ legacyCount } ) ` ,
15211530 )
15221531 . catch ( ( err ) => {
15231532 if ( err . code !== 50013 ) {
You can’t perform that action at this time.
0 commit comments