This commit is contained in:
Dragon Fire
2020-04-11 11:29:40 -04:00
parent dfe8c0a5e0
commit fe3a92a76e
13 changed files with 18 additions and 17 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ module.exports = class FirstMessageCommand extends Command {
}
async run(msg, { channel }) {
if (channel.type === 'text' && !channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) {
if (msg.guild && !channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) {
return msg.reply(`Sorry, I don't have permission to read ${channel}...`);
}
const messages = await channel.messages.fetch({ after: 1, limit: 1 });