Merge branch 'dev' into 'main'

Added disable option for staff applications

See merge request illegitimate/illegitimate-bot!23
This commit is contained in:
2023-09-11 12:17:58 +00:00
2 changed files with 9 additions and 1 deletions

View File

@@ -6,3 +6,4 @@ CLIENTID=
DEVID=
GUILDID=
HYPIXELAPIKEY=
STAFFAPPSTATUS=

View File

@@ -5,6 +5,8 @@ const { staffApplicationsChannel } = require('../../config/options.json');
const { sq1, sq2, sq3, sq4, sq5, sq6 } = require('../../config/questions.json');
const { rsq1, rsq2, rsq3, rsq4, rsq5, rsq6 } = require('../../config/questions.json');
const { guildRole, guildStaff } = require('../../config/roles.json')
const env = require('dotenv').config();
const status = process.env.STAFFAPPSTATUS;
const mongoose = require('mongoose');
const staffapp = require('../../schemas/staffAppSchema.js');
const fetch = require('axios');
@@ -26,6 +28,11 @@ module.exports = {
await interaction.deferReply({ ephemeral: true });
if (status === false) {
await interaction.editReply({ content: "Staff applications are currently closed.", ephemeral: true });
return
}
if (!userRoles.has(guildRole)) {
await interaction.editReply({ content: "You must be a member of the guild to apply for staff.", ephemeral: true });
return