Fix a bunch of linter errors
diff --git a/src/api/index.ts b/src/api/index.ts
index b94bbe0..2c4baba 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -4,7 +4,6 @@
import EmojiEmbed from "../utils/generateEmojiEmbed.js";
import structuredClone from "@ungap/structured-clone";
-
const jsonParser = bodyParser.json();
const app = express();
const port = 10000;
@@ -19,26 +18,36 @@
const secret = req.body.secret;
if (secret === client.config.verifySecret) {
const guild = await client.guilds.fetch(client.verify[code].gID);
- if (!guild) { return res.status(404); }
+ if (!guild) {
+ return res.status(404);
+ }
const member = await guild.members.fetch(client.verify[code].uID);
- if (!member) { return res.status(404); }
- if (member.roles.cache.has(client.verify[code].rID)) { return res.status(200); }
+ if (!member) {
+ return res.status(404);
+ }
+ if (member.roles.cache.has(client.verify[code].rID)) {
+ return res.status(200);
+ }
await member.roles.add(client.verify[code].rID);
const interaction = client.verify[code].interaction;
if (interaction) {
- interaction.editReply({embeds: [new EmojiEmbed()
- .setTitle("Verify")
- .setDescription("Verification complete")
- .setStatus("Success")
- .setEmoji("MEMBER.JOIN")
- ], components: []});
+ interaction.editReply({
+ embeds: [
+ new EmojiEmbed()
+ .setTitle("Verify")
+ .setDescription("Verification complete")
+ .setStatus("Success")
+ .setEmoji("MEMBER.JOIN")
+ ],
+ components: []
+ });
}
delete client.verify[code];
const { log, NucleusColors, entry, renderUser } = client.logger;
try {
const data = {
- meta:{
+ meta: {
type: "memberVerify",
displayName: "Member Verified",
calculateType: "guildMemberVerify",
@@ -70,14 +79,21 @@
try {
const interaction = client.verify[code].interaction;
if (interaction) {
- interaction.editReply({embeds: [new EmojiEmbed()
- .setTitle("Verify")
- .setDescription("Verify was opened in another tab or window, please complete the CAPTCHA there to continue")
- .setStatus("Success")
- .setEmoji("MEMBER.JOIN")
- ]});
+ interaction.editReply({
+ embeds: [
+ new EmojiEmbed()
+ .setTitle("Verify")
+ .setDescription(
+ "Verify was opened in another tab or window, please complete the CAPTCHA there to continue"
+ )
+ .setStatus("Success")
+ .setEmoji("MEMBER.JOIN")
+ ]
+ });
}
- } catch { return res.sendStatus(410); }
+ } catch {
+ return res.sendStatus(410);
+ }
const data = structuredClone(client.verify[code]);
delete data.interaction;
return res.status(200).send(data);
@@ -89,10 +105,18 @@
const code = req.params.code;
const secret = req.body.secret;
if (secret === client.config.verifySecret) {
- const guild = await client.guilds.fetch(client.roleMenu[code].guild);
- if (!guild) { return res.status(404); }
- const member = await guild.members.fetch(client.roleMenu[code].user);
- if (!member) { return res.status(404); }
+ const guild = await client.guilds.fetch(
+ client.roleMenu[code].guild
+ );
+ if (!guild) {
+ return res.status(404);
+ }
+ const member = await guild.members.fetch(
+ client.roleMenu[code].user
+ );
+ if (!member) {
+ return res.status(404);
+ }
res.sendStatus(200);
} else {
res.sendStatus(403);
@@ -105,14 +129,22 @@
try {
const interaction = client.roleMenu[code].interaction;
if (interaction) {
- interaction.editReply({embeds: [new EmojiEmbed()
- .setTitle("Roles")
- .setDescription("The role menu was opened in another tab or window, please select your roles there to continue")
- .setStatus("Success")
- .setEmoji("GUILD.GREEN")
- ], components: []});
+ interaction.editReply({
+ embeds: [
+ new EmojiEmbed()
+ .setTitle("Roles")
+ .setDescription(
+ "The role menu was opened in another tab or window, please select your roles there to continue"
+ )
+ .setStatus("Success")
+ .setEmoji("GUILD.GREEN")
+ ],
+ components: []
+ });
}
- } catch { return res.sendStatus(410); }
+ } catch {
+ return res.sendStatus(410);
+ }
const data = structuredClone(client.roleMenu[code]);
delete data.interaction;
console.log(data);
@@ -124,4 +156,4 @@
app.listen(port);
};
-export default runServer;
\ No newline at end of file
+export default runServer;