You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
var arr = []
module.exports = {
name: "join",
aliases: ["j"],
exec: async (msg) => {
const { music } = msg.guild;
if (!msg.member.voice.channel)
return msg.channel.send(:x: You need to be in a voice channel to run this command!);
if (msg.guild.me.voice.channel && !msg.guild.me.voice.channel.equals(msg.member.voice.channel))
return msg.channel.send(:thumbsup: **I've left** ${msg.guild.me.voice.channel} **and joining** ${msg.member.voice.channel}!);
await music.leave(msg.guild);
await music.join(msg.member.voice.channel);
const missingPerms = util.missingPerms(msg.guild.me.permissionsIn(msg.member.voice.channel), ["CONNECT", "SPEAK"]);
if ((!music.player || !music.player.playing) && missingPerms.length)
return msg.channel.send(Hmm :thinking: I am unable to join you're voice chat! I am missing the permission: ${missingPerms.map(x => `${x}`).join(", ")}. Do I have access to this voice chat?);
else {
await music.join(msg.member.voice.channel);
}
}
}
How do I make it leave voice channel? I got it to join just not leave to move channel.
The text was updated successfully, but these errors were encountered:
var arr = [] module.exports = { name: "join", aliases: ["j"], exec: async (msg) => { const { music } = msg.guild; if (!msg.member.voice.channel) return msg.channel.send(:x: You need to be in a voice channel to run this command!); if (msg.guild.me.voice.channel && !msg.guild.me.voice.channel.equals(msg.member.voice.channel)) return msg.channel.send(:thumbsup: **I've left** ${msg.guild.me.voice.channel} **and joining** ${msg.member.voice.channel}!); await music.leave(msg.guild); await music.join(msg.member.voice.channel); const missingPerms = util.missingPerms(msg.guild.me.permissionsIn(msg.member.voice.channel), ["CONNECT", "SPEAK"]); if ((!music.player || !music.player.playing) && missingPerms.length) return msg.channel.send(Hmm :thinking: I am unable to join you're voice chat! I am missing the permission: ${missingPerms.map(x => ``${x}``).join(", ")}. Do I have access to this voice chat?); else { await music.join(msg.member.voice.channel); }
}
}
How do I make it leave voice channel? I got it to join just not leave to move channel.
ctx.guild.members.cache.get(ctx.client.user.id).voice.setChannel(ctx.member.voice.channel) use this to move channel instead bruh
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Can you help me? I've got this so far:
const util = require("../util");
var arr = []
module.exports = {
name: "join",
aliases: ["j"],
exec: async (msg) => {
const { music } = msg.guild;
if (!msg.member.voice.channel)
return msg.channel.send(
:x: You need to be in a voice channel to run this command!
);if (msg.guild.me.voice.channel && !msg.guild.me.voice.channel.equals(msg.member.voice.channel))
return msg.channel.send(
:thumbsup: **I've left** ${msg.guild.me.voice.channel} **and joining** ${msg.member.voice.channel}!
);await music.leave(msg.guild);
await music.join(msg.member.voice.channel);
const missingPerms = util.missingPerms(msg.guild.me.permissionsIn(msg.member.voice.channel), ["CONNECT", "SPEAK"]);
if ((!music.player || !music.player.playing) && missingPerms.length)
return msg.channel.send(
Hmm :thinking: I am unable to join you're voice chat! I am missing the permission: ${missingPerms.map(x =>
`${x}`).join(", ")}. Do I have access to this voice chat?
);else {
await music.join(msg.member.voice.channel);
}
}
How do I make it leave voice channel? I got it to join just not leave to move channel.
The text was updated successfully, but these errors were encountered: