Skip to content

Commit

Permalink
[Fix] Users outside the bots voice channel should not be able to use …
Browse files Browse the repository at this point in the history
…the command!
  • Loading branch information
naseif committed Nov 15, 2021
1 parent 8a63306 commit 38283e9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions commands/Music/repeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ module.exports = {
});
}

if (
message.guild.me.voice.channelId &&
message.member.voice.channelId !== message.guild.me.voice.channelId
)
return await message.channel.send({
embeds: [
embedMessage(
"RED",
`❌ | You must be in my voice channel to activate the loop mode!`
),
],
});

switch (mode) {
case "off":
await queue.setRepeatMode(Number(0));
Expand Down

0 comments on commit 38283e9

Please sign in to comment.