fix: move players instead of rank objects
This commit is contained in:
parent
f7549776f6
commit
42b5fb8d3e
6
index.js
6
index.js
@ -652,7 +652,7 @@ client.on("interactionCreate", async (interaction) => {
|
||||
const idx = Math.floor(Math.random() * bluPlayers.length);
|
||||
const player = bluPlayers.splice(idx, 1)[0];
|
||||
try {
|
||||
await player.voice.setChannel(blu);
|
||||
await player.player.voice.setChannel(blu);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
moveErr++;
|
||||
@ -663,7 +663,7 @@ client.on("interactionCreate", async (interaction) => {
|
||||
const idx = Math.floor(Math.random() * redPlayers.length);
|
||||
const player = redPlayers.splice(idx, 1)[0];
|
||||
try {
|
||||
await player.voice.setChannel(red);
|
||||
await player.player.voice.setChannel(red);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
moveErr++;
|
||||
@ -699,6 +699,8 @@ client.on("interactionCreate", async (interaction) => {
|
||||
* - setrank: saves a player's rank
|
||||
* - getrank: prints a player's rank
|
||||
* - rankings: prints all players' ranks
|
||||
* - fun: prints or sets the FUN value
|
||||
* - passion: prints or sets the PASSION value
|
||||
* - simulateteams: simulates autocaptain results
|
||||
* - whitelist: adds an admin to the whitelist to use DM commands
|
||||
* - getwhitelist: prints the whitelist
|
||||
|
||||
Loading…
Reference in New Issue
Block a user