Skip to content

Commit

Permalink
fix: fix the condition to leave the channel (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
phenylshima authored Dec 24, 2023
1 parent 2c89e64 commit ea16c35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ client.on(Events.VoiceStateUpdate, async (_, n) => {
const pipeline = Pipeline.get(n.guild.id);

if (!pipeline) return;
if (pipeline.channel.members.filter((m) => !m.user.bot).size > 1) return;
if (pipeline.channel.members.filter((m) => !m.user.bot).size > 0) return;

setImmediate(() => pipeline.connection.destroy());
await once(pipeline, "destroy");
Expand Down

0 comments on commit ea16c35

Please sign in to comment.