Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Move const declaration for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
kyogoi committed Oct 6, 2019
1 parent 84b1851 commit 9057f19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
if (channels.some((v) => v.voice_id == oldMember.voiceChannelID)) {
const voiceChannel = bot.channels.get(oldMember.voiceChannelID);
const textChannel = bot.channels.get(channels.find((v) => v.voice_id == oldMember.voiceChannelID).text_id);
const permissions = textChannel.permissionOverwrites.find((v) => v.id == oldMember.id);

if (!voiceChannel.members.length) {
db.run('UPDATE channels SET set_to_purge = 1 WHERE voice_id = ?', [oldMember.voiceChannelID]);
}

const permissions = textChannel.permissionOverwrites.find((v) => v.id == oldMember.id);
if (permissions) permissions.delete();
if (config.emitLog) textChannel.send(`${oldMember} has left the voice channel.`);
}
Expand Down

0 comments on commit 9057f19

Please sign in to comment.