Skip to content

Commit

Permalink
refactor(util): cleaner function
Browse files Browse the repository at this point in the history
  • Loading branch information
eritislami committed Sep 16, 2021
1 parent bc94001 commit 6d95d9c
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions util/Util.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
exports.canModifyQueue = (member) => {
const { channelID } = member.voice;
const botChannel = member.guild.voice.channelID;

if (channelID !== botChannel) {
return;
}

return true;
};
exports.canModifyQueue = (member) => member.voice.channelID === member.guild.voice.channelID;

let config;

Expand All @@ -25,4 +16,4 @@ exports.MAX_PLAYLIST_SIZE = (config ? config.MAX_PLAYLIST_SIZE : process.env.MAX
exports.PRUNING = (config ? config.PRUNING : process.env.PRUNING) || false;
exports.STAY_TIME = (config ? config.STAY_TIME : process.env.STAY_TIME) || 30;
exports.DEFAULT_VOLUME = (config ? config.DEFAULT_VOLUME : process.env.DEFAULT_VOLUME) || 100;
exports.LOCALE = (config ? config.LOCALE : process.env.LOCALE) || "en";
exports.LOCALE = (config ? config.LOCALE : process.env.LOCALE) || "en";

0 comments on commit 6d95d9c

Please sign in to comment.