forked from Galactic/galactic-bot
debug
This commit is contained in:
parent
b5bf445ce4
commit
f340017492
@ -422,9 +422,11 @@ module.exports = class AutoModeration extends Observer {
|
||||
|
||||
async filterLinks(message, edited) {
|
||||
|
||||
const { guild, author, guildWrapper: wrapper } = message;
|
||||
let { channel } = message;
|
||||
if (channel.partial) channel = await channel.fetch();
|
||||
const { guild, author, guildWrapper: wrapper, channel } = message;
|
||||
if (!channel) {
|
||||
this.logger.warn(`Missing channel?\nChannelId: ${message.channelId}\nGuild: ${message.guildId}\nAuthor: ${inspect(author)}`, { broadcast: true });
|
||||
return;
|
||||
}
|
||||
if (!guild || author.bot || message.filtered) return;
|
||||
|
||||
const member = message.member || await guild.members.fetch(author.id).catch(() => null);
|
||||
|
Loading…
Reference in New Issue
Block a user