Formatting fixes

This commit is contained in:
ExtrasContainer
2024-02-04 09:21:20 +00:00
parent effb72940d
commit b73fff2d24
+3 -9
View File
@@ -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,8 +106,7 @@ module.exports = {
}
});
collector.on('end', async (collected, reason) => {
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);
} else if (!validated) {
@@ -121,8 +116,7 @@ module.exports = {
}
});
})
.catch(async (err) => {
}).catch(async (err) => {
await interaction.reply({
content: cfg.messages.unableToDM,
ephemeral: true