InviteWithMetadata

class InviteWithMetadata(val data: InviteWithMetadataData, val kord: Kord, val supplier: EntitySupplier = kord.defaultSupplier) : Invite(source)

An instance of a Discord Invite with extra information.

Constructors

Link copied to clipboard
constructor(data: InviteWithMetadataData, 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

When this invite was created.

Link copied to clipboard
open override val data: InviteWithMetadataData
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

Duration after which the invite expires.

Link copied to clipboard

Max number of times this invite can be used.

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

Link copied to clipboard

Whether this invite only grants temporary membership.

Link copied to clipboard
val uses: Int

Number of times this invite has been used.

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<*>): InviteWithMetadata

Returns a new InviteWithMetadata with the given strategy.