Fixed woomy in DM's

This commit is contained in:
Emily 2020-03-24 05:47:26 +00:00 committed by GitHub
parent 6bb1a160bd
commit 55d66f348d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,7 +152,7 @@ module.exports = async (client, message) => {
.then(m => m.delete(2000));
};
if (!perms.has('SEND_MESSAGES')) {
if (message.guild && !perms.has('SEND_MESSAGES')) {
return message.author.send(`<:error:466995152976871434> I don't have permission to speak in **#${message.channel.name}**, Please ask a moderator to give me the send messages permission!`);
};