From 13a1cf3d50fc49bfb746818a981dd7d5803ae469 Mon Sep 17 00:00:00 2001 From: DaInfLoop Date: Wed, 4 Sep 2024 19:33:55 +0100 Subject: [PATCH] add sanctioned country response --- index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/index.ts b/index.ts index eb67f60..b7cb3d1 100644 --- a/index.ts +++ b/index.ts @@ -85,6 +85,19 @@ const eligibilityCmd = async ctx => { } } + else if (res.status === "Sanctioned country") { + if (matchedBy === "user mention") { + return await ctx.respond({ + response_type: 'ephemeral', + text: `<@${userId}> lives in a country that cannot have packages delivered to due to sanctions.` + }) + } else { + return await ctx.respond({ + response_type: 'ephemeral', + text: `You live in a country that cannot have packages delivered to due to sanctions.${matchedBy == "not allowed" ? " (Only whitelisted users can check other people's verification statuses.)" : ""},` + }) + } + } else { return await ctx.respond({