From 758255f65284df9d8e8d3e8563d481321a2a967c Mon Sep 17 00:00:00 2001 From: Bram Hagens Date: Mon, 8 Apr 2024 00:19:32 +0200 Subject: [PATCH] add comments --- src/serviceProviders/discord.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/serviceProviders/discord.js b/src/serviceProviders/discord.js index 0eec06a..fbc32d9 100644 --- a/src/serviceProviders/discord.js +++ b/src/serviceProviders/discord.js @@ -49,6 +49,8 @@ export function processURI (uri) { uriRegularExpression: reURI.toString(), uriIsAmbiguous: false }, + // Get proof from invites (https://discord.com/developers/docs/resources/invite#get-invite) + // See https://discord.com/developers/docs/reference#api-versioning for Discord's API versioning proof: { request: { uri: `https://discord.com/api/v10/invites/${match[1]}`, @@ -82,6 +84,7 @@ export function processURI (uri) { export const functions = { postprocess: async (claimData, proofData, opts) => { + // Extract inviter's username from https://discord.com/developers/docs/resources/invite#invite-object claimData.profile.display = proofData.result.inviter.username return { claimData, proofData }