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

Commit

Permalink
.array().length -> .size
Browse files Browse the repository at this point in the history
  • Loading branch information
kyogoi authored Nov 2, 2019
1 parent e230d25 commit d8949d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
while (true) {
const messages = await channel.fetchMessages({ limit: 100 });

if (messages.array().length > 0) {
if (messages.size > 0) {
await channel.bulkDelete(messages);
} else {
db.run('UPDATE channels SET set_to_purge = 0 WHERE text_id = ?', [channel.id]);
Expand All @@ -37,7 +37,7 @@
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.array().length < 1) {
if (voiceChannel.members.size < 1) {
db.run('UPDATE channels SET set_to_purge = 1 WHERE voice_id = ?', [oldMember.voiceChannelID]);
}

Expand Down

0 comments on commit d8949d4

Please sign in to comment.