fix: move players instead of rank objects

This commit is contained in:
ethanf 2024-01-30 22:37:44 -06:00
parent f7549776f6
commit 42b5fb8d3e

View File

@ -652,7 +652,7 @@ client.on("interactionCreate", async (interaction) => {
const idx = Math.floor(Math.random() * bluPlayers.length); const idx = Math.floor(Math.random() * bluPlayers.length);
const player = bluPlayers.splice(idx, 1)[0]; const player = bluPlayers.splice(idx, 1)[0];
try { try {
await player.voice.setChannel(blu); await player.player.voice.setChannel(blu);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
moveErr++; moveErr++;
@ -663,7 +663,7 @@ client.on("interactionCreate", async (interaction) => {
const idx = Math.floor(Math.random() * redPlayers.length); const idx = Math.floor(Math.random() * redPlayers.length);
const player = redPlayers.splice(idx, 1)[0]; const player = redPlayers.splice(idx, 1)[0];
try { try {
await player.voice.setChannel(red); await player.player.voice.setChannel(red);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
moveErr++; moveErr++;
@ -699,6 +699,8 @@ client.on("interactionCreate", async (interaction) => {
* - setrank: saves a player's rank * - setrank: saves a player's rank
* - getrank: prints a player's rank * - getrank: prints a player's rank
* - rankings: prints all players' ranks * - rankings: prints all players' ranks
* - fun: prints or sets the FUN value
* - passion: prints or sets the PASSION value
* - simulateteams: simulates autocaptain results * - simulateteams: simulates autocaptain results
* - whitelist: adds an admin to the whitelist to use DM commands * - whitelist: adds an admin to the whitelist to use DM commands
* - getwhitelist: prints the whitelist * - getwhitelist: prints the whitelist