diff --git a/commands/bassboost.js b/commands/bassboost.js index ec12cc8e1..6375e9631 100644 --- a/commands/bassboost.js +++ b/commands/bassboost.js @@ -26,8 +26,8 @@ module.exports = { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); - else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); + //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); if (!args[0]) return client.sendTime(message.channel, "**Please provide a bassboost level. \nAvailable Levels:** `none`, `low`, `medium`, `high`"); //if the user do not provide args [arguments] diff --git a/commands/grab.js b/commands/grab.js index 7963d98bf..160912e80 100644 --- a/commands/grab.js +++ b/commands/grab.js @@ -20,6 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); message.author.send(new MessageEmbed() .setAuthor(`Saved Song:`, client.user.displayAvatarURL({ dynamic: true @@ -40,7 +41,7 @@ run: async (client, message, args, { GuildDB }) => { return message.channel.send("**:x: Your Dm's are disabled**") }) - message.react("✅").catch(e=>console.log("Could not react")) + client.sendTime(message.channel, "✅ | **Check your DMs!**") }, SlashCommand: { /** @@ -51,11 +52,12 @@ run: async (client, message, args, { GuildDB }) => { * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }) => { + const user = client.users.cache.get(interaction.member.user.id); let player = await client.Manager.get(interaction.guild_id); if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); try{ let embed = new MessageEmbed() - .setAuthor(`Saved from `, interaction.guild.name, client.user.displayAvatarURL()) + .setAuthor(`Saved Song: `, client.user.displayAvatarURL()) .setThumbnail(`https://img.youtube.com/vi/${player.queue.current.identifier}/mqdefault.jpg`) .setURL(player.queue.current.uri) .setColor("RANDOM") @@ -66,15 +68,15 @@ run: async (client, message, args, { GuildDB }) => { .addField(`▶ Play it:`, `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix }play ${player.queue.current.uri}\``) .addField(`🔎 Saved in:`, `<#${interaction.channel_id}>`) - .setFooter(`Requested by: ${player.queue.current.requester.tag} | Guild: ${interaction.guild.name}`, player.queue.current.requester.displayAvatarURL({ + .setFooter(`Requested by: ${player.queue.current.requester.tag}`, player.queue.current.requester.displayAvatarURL({ dynamic: true })) - interaction.send(embed); + user.send(embed); }catch(e) { - return client.sendTime(interaction, "**:x: Your DM's are disabled**") + return client.sendTime(interaction, "**:x: Your DMs are disabled**") } - interaction.react("✅").catch(e => console.log("Could not react")) + client.sendTime(interaction, "✅ | **Check your DMs!**") }, }, }; \ No newline at end of file diff --git a/commands/loop.js b/commands/loop.js index 5844196e3..52eaed80e 100644 --- a/commands/loop.js +++ b/commands/loop.js @@ -20,7 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); if (player.trackRepeat) { @@ -45,8 +45,8 @@ module.exports = { const voiceChannel = member.voice.channel; let player = await client.Manager.get(interaction.guild_id); if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); - if (!member.voice.channel) return interaction.send("❌ | You must be on a voice channel."); - if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return interaction.send(`❌ | You must be on ${guild.me.voice.channel} to use this command.`); + if (!member.voice.channel) return interaction.send("❌ | **You must be in a voice channel to use this command!**"); + if (guild.me.voice.channel && !guild.me.voice.channel.equals(voiceChannel)) return interaction.send(`❌ | You must be in ${guild.me.voice.channel} to use this command.`); if(player.trackRepeat){ player.setTrackRepeat(false) diff --git a/commands/loopqueue.js b/commands/loopqueue.js index d5cdcc82b..631ce54a0 100644 --- a/commands/loopqueue.js +++ b/commands/loopqueue.js @@ -20,7 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); if (player.QueueRepeat) { diff --git a/commands/pause.js b/commands/pause.js index 0e60ee711..8aca8024d 100644 --- a/commands/pause.js +++ b/commands/pause.js @@ -20,7 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); if (player.paused) return client.sendTime(message.channel, "❌ | **Music is already paused!**"); player.pause(true); diff --git a/commands/remove.js b/commands/remove.js index cf044390d..7ac5e538a 100644 --- a/commands/remove.js +++ b/commands/remove.js @@ -22,7 +22,7 @@ const { TrackUtils } = require("erela.js"); let player = await client.Manager.players.get(message.guild.id); const song = player.queue.slice(args[0] - 1, 1); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); if (!player.queue || !player.queue.length || player.queue.length === 0) diff --git a/commands/resume.js b/commands/resume.js index ab73bab10..62a9c2a3a 100644 --- a/commands/resume.js +++ b/commands/resume.js @@ -20,7 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); if (player.playing) return message.channel.send("Music is already resumed!"); diff --git a/commands/seek.js b/commands/seek.js index 483c30cc7..1fb8ae795 100644 --- a/commands/seek.js +++ b/commands/seek.js @@ -20,6 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); if (!player.queue.current.isSeekable) return message.channel.send("This song is not able to seek from."); let SeekTo = client.ParseHumanTime(args.join(" ")); if (!SeekTo) return message.channel.send("Please enter a time to seek!"); diff --git a/commands/shuffle.js b/commands/shuffle.js index d7ae47b91..aa5e1d88b 100644 --- a/commands/shuffle.js +++ b/commands/shuffle.js @@ -19,6 +19,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); if (!player.queue || !player.queue.length || player.queue.length === 0) return message.channel.send("Not enough songs in the queue to shuffle!"); player.queue.shuffle(); diff --git a/commands/skip.js b/commands/skip.js index 1de419d03..e07ee0541 100644 --- a/commands/skip.js +++ b/commands/skip.js @@ -20,6 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); player.stop(); await message.react("✅"); }, diff --git a/commands/skipto.js b/commands/skipto.js index fddb155f8..0904b9456 100644 --- a/commands/skipto.js +++ b/commands/skipto.js @@ -27,7 +27,7 @@ module.exports = { }); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); - if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); try { diff --git a/commands/volume.js b/commands/volume.js index 4daf46eaa..c65498456 100644 --- a/commands/volume.js +++ b/commands/volume.js @@ -20,6 +20,7 @@ module.exports = { run: async (client, message, args, { GuildDB }) => { let player = await client.Manager.get(message.guild.id); if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); + if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**"); if (!parseInt(args[0])) return message.channel.send("Please choose between 1 - 100"); let vol = parseInt(args[0]); player.setVolume(vol);