woops again
This commit is contained in:
parent
284343f156
commit
50bd8e1c06
1 changed files with 8 additions and 2 deletions
|
@ -42,8 +42,14 @@ let commands: Command[];
|
|||
msg.author_id == client.user?._id ||
|
||||
!msg.channel?.server) return;
|
||||
|
||||
if (!msg.member) await msg.channel.server.fetchMember(msg.author_id);
|
||||
if (msg.author?.bot) return;
|
||||
try {
|
||||
if (!msg.member) await msg.channel.server.fetchMember(msg.author_id);
|
||||
if (!msg.author) await client.users.fetch(msg.author_id);
|
||||
} catch(e) {
|
||||
return msg.reply('⚠ Failed to fetch message author');
|
||||
}
|
||||
|
||||
if (msg.author!.bot) return;
|
||||
|
||||
// If we can't reply to the message, return
|
||||
if (!hasPermForChannel(await getOwnMemberInServer(msg.channel.server), msg.channel, 'SendMessage')) {
|
||||
|
|
Loading…
Reference in a new issue