invidget icon indicating copy to clipboard operation
invidget copied to clipboard

Add support for friend invites

Open neu-ma-tic opened this issue 2 years ago • 2 comments

Friend invites are now available via the API, and may be released soon in the client. Currently, invidget just times out, rather than properly displaying the friend invite.

image

ex: https://invidget.switchblade.xyz/ZdErpjfX

how it looks in the discord client

image


invidget would need to get the data about the user via the inviter property of the invite itself, since there is no guild. The full API data is shown below.

/api/v9/invites/ZdErpjfX

{
  "code": "ZdErpjfX",
  "inviter": {
    "id": "921120740567314502",
    "username": "neu",
    "avatar": "1b9344fd45ded05c436a83db752d9701",
    "avatar_decoration": null,
    "discriminator": "1337",
    "public_flags": 0
  },
  "channel": null,
  "type": 2,
  "expires_at": "2022-07-01T16:43:29+00:00"
}

(to make a user invite, post to /users/@me/invites) this may be considered as selfbotting, so not recommending it!!!

neu-ma-tic avatar Jun 25 '22 06:06 neu-ma-tic

(also i may work on this as a pr if i find some time to do it, but likely not)

neu-ma-tic avatar Jun 25 '22 06:06 neu-ma-tic

Hi! I'm gonna take a look this week with the new api version, I didn't knew that discord already updated it. Thanks for letting us know 🎉

PS: That would look amazing on README's or websites

Doges avatar Jun 26 '22 12:06 Doges