mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 18:55:28 +00:00
woops again
This commit is contained in:
parent
284343f156
commit
50bd8e1c06
|
@ -42,8 +42,14 @@ let commands: Command[];
|
||||||
msg.author_id == client.user?._id ||
|
msg.author_id == client.user?._id ||
|
||||||
!msg.channel?.server) return;
|
!msg.channel?.server) return;
|
||||||
|
|
||||||
if (!msg.member) await msg.channel.server.fetchMember(msg.author_id);
|
try {
|
||||||
if (msg.author?.bot) return;
|
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 we can't reply to the message, return
|
||||||
if (!hasPermForChannel(await getOwnMemberInServer(msg.channel.server), msg.channel, 'SendMessage')) {
|
if (!hasPermForChannel(await getOwnMemberInServer(msg.channel.server), msg.channel, 'SendMessage')) {
|
||||||
|
|
Loading…
Reference in a new issue