Get invite code

コメント

7件のコメント

  • pxpcandy

    Already possible, click server settings then invites to see a list of all invites

    -1
  • durss

    Thank you for your answer @pxpcandy!

    I think you misunderstood my request and its context (we are in the API/developer section).

    I know i can get the invites from the Discord UI but i'm talking about the API here. It's also possible to get the invite list from the API but that's still not what i'm asking for :)

    What i want is that when a user joins my discord from an invite link, to know WHICH link s/he used to join it.

    This way i can automate some actions depending on the link used to join the discord.

     

    I hope it's clearer for you. If you want to undo your downvote that would be nice ;) (if that's you of course, nevermind otherwise)

    2
  • pxpcandy

    oh , idk how to help then. sorry about that lol

    0
  • Kashix.

    Greetings durss.

    I'm not sure if what I'm about to tell you may work, but if you check the DiscordJS documentation, theres a class called inviteCreate, that creates an invite. The parameter of this class is Invite, and if you enter to this parameter, you will be able to observe the differents properties of it. One of this properties is TargetUser, that I'm not sure of this but maybe you could play a bit with it and get the user is joining the guild.

    This is the link.

    Hope I've helped you.
    Have a nice day, Kashix.

    0
  • durss

    Hello Kashix!

     

    Thank you for your answer :)

    I can't find the answer for sure without trying it myself but the TargetUser is a user object so i believe it's made to send an invite to one specific user.

    In any case, my problem is not to know when a user joins the guild, this i already know, but what link the user clicked to join it. The TargetUser being a user object it won't be much helpful in any case :/

     

    I just saw a very old UI update suggestion that approaches my request :

    https://support.discord.com/hc/en-us/community/posts/360030115172-Generate-an-invite-link-to-add-a-user-to-a-role-

     

    Thank you again for trying to help !

    Much appreciated :D

    0
  • B R

    This is very much a needed feature to help server admins. Perhaps we want to reward members who invite X users. Or perhaps our server is being spam raided and we need to kill the invite they're all using. The current methods are kludgy and make it difficult to track single-use invites.

    0
  • LawMixer

    This is a very good suggestion, and it seems like with the “Join Method”, they can do it. Hopefully, they'll do it soon.

    2

サインインしてコメントを残してください。