mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
fix: handle no queue dispatcher error when /queue and bot not in vc
This commit is contained in:
1 parent
94ef202c7f
commit
bd249e6867
1 file changed
+3
-2
@@ -23,8 +23,9 @@ exports.notInVoiceChannel = async (interaction) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.notInSameVoiceChannel = async (interaction, queue) => {
|
exports.notInSameVoiceChannel = async (interaction, queue) => {
|
||||||
if (!queue.dispatcher) {
|
if (!queue || !queue.dispatcher) {
|
||||||
return true;
|
// If there is no queue or bot is not in voice channel, then there is no need to check if user is in same voice channel.
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interaction.member.voice.channel.id !== queue.dispatcher.channel.id) {
|
if (interaction.member.voice.channel.id !== queue.dispatcher.channel.id) {
|
||||||
|
|||||||
Reference in new issue
Block a user