Add invite data to user joined event



  • espen


    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:


    "invites": [
    "code_one": 54,
    "code_two": 3

    Psst... This is the appropriate GMA link- yours is broken! (




  • B R

    Very well stated and laid out! To add to that, I'd love to see the Guild Name or ID of where that link was clicked - if it was sent via Discord and the option to block or report invites from that Guild. That won't always be an option since the invite could be from anywhere on the web, but any tools to help server admins are appreciated!

  • moein.ak

    I'm thinking about building a tool that allows a bot you invite to your channel to grant roles and invite the user to channels based on the invitation link they join with
    It's precise and in edge cases adds a little work to the invitee
    If anyone interestedin helping me with the beta testing please reach out to me on discord (you will get a year of free access as a thank you gift)

    My discord id: moein#0371


Please sign in to leave a comment.