Minor fix to not send app if member not meet reqs

This commit is contained in:
2023-04-03 22:16:53 +02:00
parent cffa24de5a
commit b93da65944

View File

@@ -28,16 +28,19 @@ module.exports = {
if (!userRoles.has(guildRole)) { if (!userRoles.has(guildRole)) {
await interaction.editReply({content: "You must be a member of the guild to apply for staff.", ephemeral: true}); await interaction.editReply({content: "You must be a member of the guild to apply for staff.", ephemeral: true});
return
} }
if (userRoles.has(guildStaff)) { if (userRoles.has(guildStaff)) {
await interaction.editReply({content: "You are already a staff member.", ephemeral: true}); await interaction.editReply({content: "You are already a staff member.", ephemeral: true});
return
} }
const application = await staffapp.findOne({ userID: user.id }); const application = await staffapp.findOne({ userID: user.id });
if (application) { if (application) {
await interaction.editReply({ content: "You already have an application in progress.", ephemeral: true }); await interaction.editReply({ content: "You already have an application in progress.", ephemeral: true });
return
} }
const tooLong = new EmbedBuilder() const tooLong = new EmbedBuilder()