WebhookBehavior

The behavior of a Discord Webhook.

Inheritors

Properties

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
abstract val supplier: EntitySupplier

The supplier used to request entities.

Functions

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 this webhook, this user must be the creator.

open suspend fun delete(token: String, reason: String? = null)

Requests to delete this webhook.

Link copied to clipboard
open suspend fun deleteMessage(token: String, messageId: Snowflake, threadId: Snowflake? = null)

Requests to delete the Message with the given messageId previously sent from this webhook using the token for authentication.

Link copied to clipboard
inline suspend fun WebhookBehavior.edit(builder: WebhookModifyBuilder.() -> Unit): Webhook

Requests to edit the webhook, this user must be the creator.

inline suspend fun WebhookBehavior.edit(token: String, builder: WebhookModifyBuilder.() -> Unit): Webhook

Requests to edit the webhook.

Link copied to clipboard
inline suspend fun WebhookBehavior.execute(token: String, threadId: Snowflake? = null, builder: WebhookMessageCreateBuilder.() -> Unit): Message

Requests to execute this webhook.

Link copied to clipboard
inline suspend fun WebhookBehavior.executeIgnored(token: String, threadId: Snowflake? = null, builder: WebhookMessageCreateBuilder.() -> Unit)

Requests to execute this webhook.

Link copied to clipboard
open suspend fun getMessage(token: String, messageId: Snowflake, threadId: Snowflake? = null): Message

Requests the Message with the given messageId previously sent from this webhook using the token for authentication.

Link copied to clipboard
open suspend fun getMessageOrNull(token: String, messageId: Snowflake, threadId: Snowflake? = null): Message?

Requests the Message with the given messageId previously sent from this webhook using the token for authentication, returns null when the message isn't present.

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

Returns a new WebhookBehavior with the given strategy.