generated from nhcarrigan/template
fix: check if member bannable, exclude bots + system
This commit is contained in:
@@ -20,7 +20,11 @@ export const handleMessage = async(
|
||||
if (!message.inGuild()) {
|
||||
return;
|
||||
}
|
||||
const { author, member, guild, channel } = message;
|
||||
const { author, member, guild, channel, system } = message;
|
||||
|
||||
if (author.bot || system) {
|
||||
return;
|
||||
}
|
||||
|
||||
const cached = umbrelle.cache.get(guild.id);
|
||||
if (cached !== channel.id) {
|
||||
@@ -34,6 +38,9 @@ export const handleMessage = async(
|
||||
if (!resolvedMember) {
|
||||
return;
|
||||
}
|
||||
if (!resolvedMember.bannable) {
|
||||
return;
|
||||
}
|
||||
await author.send({
|
||||
content: `Your account appears to have been compromised. As a security measure, you have been removed from the ${guild.name} community.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user