Invite

open class Invite(val data: BaseInviteData, val kord: Kord, val supplier: EntitySupplier = kord.defaultSupplier) : KordObject, Strategizable(source)

An instance of a Discord Invite.

Inheritors

Constructors

Link copied to clipboard
constructor(data: BaseInviteData, kord: Kord, supplier: EntitySupplier = kord.defaultSupplier)

Properties

Link copied to clipboard

Approximate count of total members.

Link copied to clipboard

Approximate count of online members.

Link copied to clipboard

The behavior of the channel this invite is for.

Link copied to clipboard

The id of the channel this invite is for.

Link copied to clipboard

The unique code of this invite.

Link copied to clipboard
Link copied to clipboard

The expiration date of this invite.

Link copied to clipboard

The event this invite is for.

Link copied to clipboard

The user behavior of the user who created this invite, if present.

Link copied to clipboard

The id of the user who created this invite, if present.

Link copied to clipboard
override val kord: Kord

The kord instance that created this object.

Link copied to clipboard

Returns PartialGuild if this invite is for a guild.

Link copied to clipboard
override val supplier: EntitySupplier

The supplier used to request entities.

Link copied to clipboard

The embedded application to open for this voice channel embedded application invite.

Link copied to clipboard

The type of target for this voice channel invite.

Link copied to clipboard

The behavior of the user whose stream to display for this voice channel stream invite

Link copied to clipboard

The id of the user whose stream to display for this voice channel stream invite

Functions

Link copied to clipboard
suspend fun delete(reason: String? = null): Invite

Requests to delete this invite.

Link copied to clipboard
suspend fun getChannelOrNull(): Channel?

Requests to get the channel this invite is for, returns null if the Channel isn't present.

Link copied to clipboard
suspend fun getInviterOrNull(): User?

Requests to get the creator of the invite for, returns null if the User isn't present or inviterId is null.

Link copied to clipboard
suspend fun getTargetUserOrNull(): User?

Requests to get the user this invite was created for, returns null if the User isn't present or targetUserId is null.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun withStrategy(strategy: EntitySupplyStrategy<*>): Invite

Returns a new Invite with the given strategy.