Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Commit

Permalink
ready fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasptsch committed Mar 6, 2022
1 parent a5db250 commit 79681ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export const ready: Event = {
const primaries = await db.primary.findMany();
for (let index = 0; index < primaries.length; index++) {
const element = primaries[index];
const channel = await client.channels.cache.get(element.id)
const channel = await client.channels.fetch(element.id)
if (!channel.isVoice()) return;
if (channel.members.size > 0) {
const channelMembers = [...channel.members.values()]
channelMembers[0]

const secondary = await createSecondary(channel.guild.channels, element.id, channelMembers[0])
channelMembers.slice(1).forEach(channelMember => {
channelMember.voice.setChannel(secondary)
Expand Down

0 comments on commit 79681ef

Please sign in to comment.