forked from Mirrors/doipjs
add comments
This commit is contained in:
parent
fff5ce4aca
commit
758255f652
1 changed files with 3 additions and 0 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue