GuildChannelBehavior

Properties

Link copied to clipboard

The guild behavior this channel is associated to.

Link copied to clipboard
abstract val guildId: Snowflake

The id of the guild this channel is associated to.

Link copied to clipboard
abstract val id: Snowflake

The unique identifier of this entity.

Link copied to clipboard
abstract val kord: Kord

The kord instance that created this object.

Link copied to clipboard
open val mention: String

This channel formatted as a mention as used by the Discord API.

Link copied to clipboard
abstract val supplier: EntitySupplier

The supplier used to request entities.

Functions

Link copied to clipboard
open suspend override fun asChannel(): GuildChannel

Requests to get this behavior as a TopGuildChannel.

Link copied to clipboard
inline suspend fun <T : Channel> ChannelBehavior.asChannelOf(): T

Requests to get the Channel represented by this ChannelBehavior.

Link copied to clipboard
inline suspend fun <T : Channel> ChannelBehavior.asChannelOfOrNull(): T?

Requests to get the Channel represented by this ChannelBehavior, returns null if the Channel isn't present.

Link copied to clipboard
open suspend override fun asChannelOrNull(): GuildChannel?

Requests to get this behavior as a TopGuildChannel, returns null if the channel isn't present or if the channel isn't a guild channel.

Link copied to clipboard
open operator override fun compareTo(other: Entity): Int

Compares entities on id.

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

Requests to delete a channel (or close it if this is a dm channel).

Link copied to clipboard
open suspend override fun fetchChannel(): GuildChannel

Retrieve the GuildChannel associated with this behaviour from the provided EntitySupplier

Link copied to clipboard
open suspend override fun fetchChannelOrNull(): GuildChannel?

Retrieve the GuildChannel associated with this behaviour from the provided EntitySupplier returns null if the GuildChannel isn't present.

Link copied to clipboard
open suspend fun getGuild(): Guild

Requests to get this channel's Guild.

Link copied to clipboard
open suspend fun getGuildOrNull(): Guild?

Requests to get this channel's Guild, returns null if the guild isn't present.

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

Returns a new TopGuildChannelBehavior with the given strategy.