forked from Galactic/galactic-bot
error handling for missing members
This commit is contained in:
parent
757601c608
commit
d4ceb44be9
@ -72,7 +72,11 @@ class GuildLogger extends Observer {
|
||||
|
||||
await message.guild.settings();
|
||||
|
||||
if (!message.member) message.member = await message.guild.members.fetch(message.author.id).catch();
|
||||
if (!message.member) try {
|
||||
message.member = await message.guild.members.fetch(message.author.id);
|
||||
} catch (_) {
|
||||
// Member not found, do nothing
|
||||
}
|
||||
|
||||
const { messageLog } = message.guild._settings;
|
||||
if(!messageLog.channel) return undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user