add sanctioned country response

This commit is contained in:
Haroon 2024-09-04 19:33:55 +01:00
parent 5bbf1163e4
commit 13a1cf3d50
Signed by: haroon
GPG key ID: 8B96C44DDF5756E4

View file

@ -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({