Only check permissions on current channel
This commit is contained in:
parent
b9a6b9e615
commit
f2e81b7eeb
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ module.exports = async (message) => {
|
|||
if (message.author.bot) return;
|
||||
|
||||
// don't run command if bot can't send messages
|
||||
if (message.channel.guild && (!message.channel.guild.members.get(client.user.id).permissions.has("sendMessages") || !message.channel.permissionsOf(client.user.id).has("sendMessages"))) return;
|
||||
if (message.channel.guild && !message.channel.permissionsOf(client.user.id).has("sendMessages")) return;
|
||||
|
||||
// this is here to prevent reading the database if a message is unrelated
|
||||
let valid = false;
|
||||
|
|
Loading…
Reference in a new issue