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) {
|
async filterLinks(message, edited) {
|
||||||
|
|
||||||
const { guild, author, guildWrapper: wrapper } = message;
|
const { guild, author, guildWrapper: wrapper, channel } = message;
|
||||||
let { channel } = message;
|
if (!channel) {
|
||||||
if (channel.partial) channel = await channel.fetch();
|
this.logger.warn(`Missing channel?\nChannelId: ${message.channelId}\nGuild: ${message.guildId}\nAuthor: ${inspect(author)}`, { broadcast: true });
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!guild || author.bot || message.filtered) return;
|
if (!guild || author.bot || message.filtered) return;
|
||||||
|
|
||||||
const member = message.member || await guild.members.fetch(author.id).catch(() => null);
|
const member = message.member || await guild.members.fetch(author.id).catch(() => null);
|
||||||
|
Loading…
Reference in New Issue
Block a user