feat: print teams after autocap
This commit is contained in:
parent
c42e315a45
commit
e2e4464306
16
index.js
16
index.js
@ -758,6 +758,22 @@ client.on("interactionCreate", async (interaction) => {
|
|||||||
bluPlayers = bluPlayers.concat(bluBalanced);
|
bluPlayers = bluPlayers.concat(bluBalanced);
|
||||||
redPlayers = redPlayers.concat(redBalanced);
|
redPlayers = redPlayers.concat(redBalanced);
|
||||||
|
|
||||||
|
// sort alphebetically then build string
|
||||||
|
bluPlayers.sort((a, b) => a.player.displayName.localeCompare(b.player.displayName));
|
||||||
|
redPlayers.sort((a, b) => a.player.displayName.localeCompare(b.player.displayName));
|
||||||
|
|
||||||
|
let teamStr = `${backticks}BLU:`;
|
||||||
|
for (const player of bluPlayers) {
|
||||||
|
teamStr += `\n${player.player.displayName}`;
|
||||||
|
}
|
||||||
|
teamStr += `\n\nRED:`;
|
||||||
|
for (const player of redPlayers) {
|
||||||
|
teamStr += `\n${player.player.displayName}`;
|
||||||
|
}
|
||||||
|
teamStr += backticks;
|
||||||
|
|
||||||
|
await interaction.followUp(teamStr);
|
||||||
|
|
||||||
let moveErr = 0;
|
let moveErr = 0;
|
||||||
|
|
||||||
// move to team voice channels
|
// move to team voice channels
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user