Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class Captcha extends EventEmitter {
await captchaEmbed.delete({
reason: "Captcha Timeout"
});
try{
await channel.send({
embeds: [captchaIncorrect],
}).then(async msg => {
Expand Down Expand Up @@ -366,6 +367,9 @@ class Captcha extends EventEmitter {
}
}
})
} catch (e){
console.log((captchaData.options.kickIfRoleRemoved && captchaData.options.kickIfRoleAdded) ? "Either user has left server or kick user failed" : "User has left the server.");
}
return false;
}

Expand Down Expand Up @@ -484,6 +488,7 @@ class Captcha extends EventEmitter {
}

// If channel is in a DM, it will send the incorrect embed.
try{
await channel.send({
embeds: [captchaIncorrect],
}).then(async msg => {
Expand All @@ -501,7 +506,11 @@ class Captcha extends EventEmitter {
}
}

})
});
} catch(e){
console.log((captchaData.options.kickIfRoleRemoved && captchaData.options.kickIfRoleAdded) ? "[CAPTCHA] Either user"+ member.user.username +" has left server or kick user failed" : "[CAPTCHA] User" + member.user.username +" has left the server.");
}

return false;

}
Expand Down