fixed voiceStateUpdate (fr this time)

This commit is contained in:
ayeuhugyu 2024-01-03 16:58:09 -08:00
parent 406493ad7b
commit 025c552f97

View file

@ -2,7 +2,6 @@ import { getVoiceConnection } from "@discordjs/voice";
export default async function (oldState, newState, client) {
if (oldState.channelId === null || typeof oldState.channelId == "undefined") {
console.log(`voice state update for joining vc, ignoring`);
return;
}
const guild = oldState.guild;
@ -21,18 +20,6 @@ export default async function (oldState, newState, client) {
if (connection) {
if (connection.joinConfig.channelId === oldState.channelId) {
if (newState.channelId !== undefined) {
console.log(
oldState.guild.members.cache.filter(
(member) =>
member.voice.channelId === connection.joinConfig.channelId
)
);
console.log(
oldState.guild.members.cache.filter(
(member) =>
member.voice.channelId === connection.joinConfig.channelId
).size
);
if (
guild.members.cache.filter(
(member) =>