diff --git a/package.json b/package.json index dc5357ab..fddde595 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "musix", - "version": "3.8.3", + "version": "3.8.4", "description": "V3 for Musix the discord music bot", "main": "./index.js", "scripts": { diff --git a/src/events/clientEvents/msg.js b/src/events/clientEvents/msg.js index c7a211da..faed2212 100644 --- a/src/events/clientEvents/msg.js +++ b/src/events/clientEvents/msg.js @@ -8,6 +8,8 @@ module.exports = { let prefix = client.global.db.guilds[msg.guild.id].prefix || client.config.prefix; const args = msg.content.slice(prefix.length).split(" "); if (client.config.devMode) prefix = client.config.devPrefix; + const permission = msg.channel.permissionsFor(client.user); + if (!permission.has("SEND_MESSAGES")) return; if (msg.mentions.users.first()) { if (msg.mentions.users.first().id === client.user.id) { if (!args[1]) return; diff --git a/src/events/dispatcherEvents/finish.js b/src/events/dispatcherEvents/finish.js index cfa5930b..cf42ac62 100644 --- a/src/events/dispatcherEvents/finish.js +++ b/src/events/dispatcherEvents/finish.js @@ -63,7 +63,7 @@ function findSimilar(client, queue, prevSongs, guild) { queue.songs.push({ title: Discord.Util.escapeMarkdown(songInfo.videoDetails.title), url: `https://www.youtube.com/watch?v=${songs[random].youtubeId}`, - author: {}, + author: client.user, type: "ytdl", info: songInfo.videoDetails, track: query.track, diff --git a/src/struct/funcs/exe.js b/src/struct/funcs/exe.js index 56023177..1db2fdf3 100644 --- a/src/struct/funcs/exe.js +++ b/src/struct/funcs/exe.js @@ -1,5 +1,5 @@ module.exports = function (msg, args, client, Discord, command) { - const permissions = msg.channel.permissionsFor(msg.client.user); + const permissions = msg.channel.permissionsFor(client.user); if (!permissions.has("EMBED_LINKS")) return msg.channel.send(client.messages.noPermsEmbed); if (!permissions.has("USE_EXTERNAL_EMOJIS"))