mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Fix
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = class FirstMessageCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, { channel }) {
|
async run(msg, { channel }) {
|
||||||
if (msg.channel.type === 'text' && !msg.channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) {
|
if (channel.type === 'text' && !channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) {
|
||||||
return msg.reply(`Sorry, I don't have permission to read ${channel}...`);
|
return msg.reply(`Sorry, I don't have permission to read ${channel}...`);
|
||||||
}
|
}
|
||||||
const messages = await channel.messages.fetch({ after: 1, limit: 1 });
|
const messages = await channel.messages.fetch({ after: 1, limit: 1 });
|
||||||
|
|||||||
Reference in New Issue
Block a user