Skip to content

Commit

Permalink
chore: use new constants throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
almostSouji committed Sep 3, 2023
1 parent 2ca2a16 commit 3b51b65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/yuudachi/src/events/guild-log/voiceStateUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class implements Event {
for await (const [oldState, newState] of on(this.client, this.event) as AsyncIterableIterator<
[VoiceState | null, VoiceState]
>) {
if (oldState?.member?.user.bot || newState?.member?.user.bot) {
if (oldState?.member?.user.bot || newState.member?.user.bot) {
continue;
}

Expand Down Expand Up @@ -53,7 +53,7 @@ export default class implements Event {
});

if ((!oldState?.channel || fromIgnored) && newState.channel) {
if (!newState.member || ignoreChannels.includes(newState.channel.id)) {
if (!newState.member || toIgnored) {
continue;
}

Expand All @@ -78,7 +78,7 @@ export default class implements Event {
icon_url: newState.member.user.displayAvatarURL(),
};
} else if (oldState?.channel && (!newState.channel || toIgnored)) {
if (!oldState.member || ignoreChannels.includes(oldState.channel.id)) {
if (!oldState.member || fromIgnored) {
continue;
}

Expand Down

0 comments on commit 3b51b65

Please sign in to comment.