Formatting fixes
This commit is contained in:
@@ -10,10 +10,10 @@ module.exports = {
|
||||
const guildId = interaction.guild.id;
|
||||
|
||||
async function generateCaptcha(count) {
|
||||
|
||||
var upchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
var lowchars = "abcdefghijklmnopqrstuvwxyz";
|
||||
var nums = "0123456789";
|
||||
|
||||
//get a random letter/number from upchars, lowchars, and nums
|
||||
var chars = upchars + lowchars + nums;
|
||||
var captcha = "";
|
||||
@@ -64,9 +64,6 @@ module.exports = {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const buff = await createCaptcha(captcha);
|
||||
const attachment = new AttachmentBuilder(buff, { name: 'captcha.png' });
|
||||
|
||||
@@ -90,7 +87,6 @@ module.exports = {
|
||||
});
|
||||
|
||||
collector.on('collect', async (m) => {
|
||||
|
||||
//if member left the server before the verification is done
|
||||
if (!interaction.guild.members.cache.has(interaction.user.id)) {
|
||||
await interaction.user.send(cfg.messages.userLeft);
|
||||
@@ -110,7 +106,6 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
collector.on('end', async (collected, reason) => {
|
||||
if (reason === 'time' && !validated) { // Send timeout message only if not already validated
|
||||
await interaction.user.send(cfg.messages.tookTooLong);
|
||||
@@ -121,8 +116,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
.catch(async (err) => {
|
||||
}).catch(async (err) => {
|
||||
await interaction.reply({
|
||||
content: cfg.messages.unableToDM,
|
||||
ephemeral: true
|
||||
|
||||
Reference in New Issue
Block a user