getInviteOrNull

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

Requests to get the Invite represented by the code, returns null if the Invite isn't present.

The returned Invite, if found, uses the default strategy used by Kord.

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

Throws

if anything went wrong during the request.