Add invite data to user joined event

Comments

1 comment

  • ca

    Hey,

    This is a viable implementation. Looking at the solutions you provided, I'd opt for the last one mentioned. Associating all GuildMemberAdd (GMA) objects with an Invite Code enables more accurate tracking of invites & voids the issue where a bot has to essentially guess which GMA is associated to an invite.

    Supposing you want to track invities associated with a user, you only need to GET Invite Object once. This is required to associate an inviter with their respective Invite Codes. You do not have to do a REST upon all GMA events, so I don't consider it a huge deal. Just link the inviter with the invite codes ONCE, and you're done - no excessive load:

    JSON:

    {
    "inviter":"168056485593481216",
    "invites": [
    "code_one": 54,
    "code_two": 3
    ]
    }

    Psst... This is the appropriate GMA link- yours is broken! (https://discordapp.com/developers/docs/topics/gateway#guild-member-add).

     

    Cheers,

    Charm

    0
    Comment actions Permalink

Please sign in to leave a comment.