Skip to content

Commit 92e206b

Browse files
committed
updated active matches vc:
"# Active Matches (#:#)" with Standard:Legacy
1 parent 27c7d5c commit 92e206b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/utils/matchHelpers.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)