From 7f2f2decc4de3db8b656fdec141253c9af268f47 Mon Sep 17 00:00:00 2001 From: DaInfLoop Date: Fri, 27 Jun 2025 12:32:23 +0100 Subject: [PATCH] using the wrong property name :sob: --- index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.ts b/index.ts index 467b783..f7e8ee2 100644 --- a/index.ts +++ b/index.ts @@ -30,14 +30,14 @@ const eligibilityCmd = async (ctx: any) => { redirect: "follow" }).then(res => res.json()) - if (res.status === "not_found") + if (res.result === "not_found") return await ctx.respond({ response_type: 'ephemeral', text: `${matchedBy !== "user mention" ? "You aren't" : `<@${userId}> isn't`} verified. ${matchedBy !== "user mention" ? `\nCheck out the to verify.` : ""}`, unfurl_links: true }) - else if (res.status === "needs_submission") { + else if (res.result === "needs_submission") { return await ctx.respond({ response_type: 'ephemeral', text: `${matchedBy !== "user mention" ? "You" : `<@${userId}>`} provided insufficient evidence of who ${matchedBy !== "user mention" ? "you" : "they"} are.${matchedBy !== "user mention" ? `\nCheck out the to re-verify.` : ""}`, @@ -45,14 +45,14 @@ const eligibilityCmd = async (ctx: any) => { }) } - else if (res.status === "pending") { + else if (res.result === "pending") { return await ctx.respond({ response_type: 'ephemeral', text: `${matchedBy !== "user mention" ? "Your verification" : `<@${userId}>'s verification`} has not been accepted yet.`, }) } - else if (res.status === "rejected") { + else if (res.result === "rejected") { if (matchedBy === "user mention") { return await ctx.respond({ response_type: 'ephemeral', @@ -85,14 +85,14 @@ const eligibilityCmd = async (ctx: any) => { } */ - else if (res.status === "verified_eligible") { + else if (res.result === "verified_eligible") { return await ctx.respond({ response_type: 'ephemeral', text: `${matchedBy !== "user mention" ? "You have verified your" : `<@${userId}> has verified their`} identity, and ${matchedBy !== "user mention" ? "are" : "is"} eligible for YSWS prizes.`, }) } - else if (res.status === "verified_but_over_18") { + else if (res.result === "verified_but_over_18") { return await ctx.respond({ response_type: 'ephemeral', text: `${matchedBy !== "user mention" ? "You have verified your" : `<@${userId}> has verified their`} identity, but since ${matchedBy !== "user mention" ? "you're" : "they're"} over 18, ${matchedBy !== "user mention" ? "you're" : "they're"} ineligible for YSWS prizes.`,