getInvite

open suspend fun getInvite(code: String, withCounts: Boolean = true, withExpiration: Boolean = true, scheduledEventId: Snowflake? = null): Invite(source)

Requests to get the Invite represented by the code.

This is not resolvable through cache and will always use the rest strategy instead.

Throws

if anything went wrong during the request.

if the Invite wasn't present.