Added initial support for detecting videos, prevent music messages from showing on soundboard commands, fixed(?) permission checking

This commit is contained in:
TheEssem 2021-04-19 09:31:39 -05:00
parent 8aa0cc2163
commit c67499af9d
6 changed files with 26 additions and 22 deletions

View file

@ -4,7 +4,7 @@ const { random } = require("../utils/misc.js");
module.exports = async (client, member, oldChannel) => {
const connection = soundPlayer.players.get(oldChannel.guild.id);
if (connection && oldChannel.id === connection.voiceChannel.id) {
if (connection && connection.type === "music" && oldChannel.id === connection.voiceChannel.id) {
if (oldChannel.voiceMembers.filter((i) => i.id !== client.user.id).length === 0) {
const waitMessage = await client.createMessage(connection.originalChannel.id, "🔊 Waiting 10 seconds for someone to return...");
const awaitRejoin = new AwaitRejoin(oldChannel, true);