From 932f45278161932488f4190650d1978d0fc6c80d Mon Sep 17 00:00:00 2001 From: mlnrDev Date: Mon, 11 Dec 2023 18:25:24 +0100 Subject: [PATCH] Add Type to Invite --- discord/invite.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/discord/invite.go b/discord/invite.go index 37c96324d..36bc7c746 100644 --- a/discord/invite.go +++ b/discord/invite.go @@ -18,6 +18,7 @@ const ( // Invite is a partial invite struct type Invite struct { + Type InviteType `json:"type"` Code string `json:"code"` Guild *InviteGuild `json:"guild"` Channel *InviteChannel `json:"channel"` @@ -35,6 +36,14 @@ func (i Invite) URL() string { return InviteURL(i.Code) } +type InviteType int + +const ( + InviteTypeGuild InviteType = iota + InviteTypeGroupDM + InviteTypeFriend +) + type ExtendedInvite struct { Invite Uses int `json:"uses"`