mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-02-07 20:17:11 +00:00
discord: Add Invite.URL() methods
This commit is contained in:
parent
fb2032d538
commit
2013da8255
|
@ -32,6 +32,16 @@ type Invite struct {
|
|||
InviteMetadata
|
||||
}
|
||||
|
||||
// URL returns a Discord invite URL linking to the invite.
|
||||
func (i Invite) URL() string {
|
||||
return "https://discord.gg/" + i.Code
|
||||
}
|
||||
|
||||
// LongURL returns a long-form Discord invite URL linking to the invite.
|
||||
func (i Invite) LongURL() string {
|
||||
return "https://discord.com/invite/" + i.Code
|
||||
}
|
||||
|
||||
// https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
type InviteUserType uint8
|
||||
|
||||
|
|
Loading…
Reference in a new issue