DiscordWebhook

data class DiscordWebhook(val id: Snowflake, val type: WebhookType, val guildId: OptionalSnowflake = OptionalSnowflake.Missing, val channelId: Snowflake, val user: Optional<DiscordUser> = Optional.Missing(), val name: String?, val avatar: String?, val token: Optional<String> = Optional.Missing(), val applicationId: Snowflake?)(source)

A representation of the Discord Webhook structure.

Parameters

id

The id of the webhook.

type

The type of the webhook.

guildId

The guild id this webhook is for.

channelId

The channel id this webhook is for.

user

The user this webhook was created by (not present when getting a webhook with its token).

name

The default name of the webhook.

avatar

The default avatar of the webhook.

token

The secure token of this webhook (returned for incoming webhooks).

applicationId

The bot/OAuth2 application that created this webhook.

Constructors

Link copied to clipboard
constructor(id: Snowflake, type: WebhookType, guildId: OptionalSnowflake = OptionalSnowflake.Missing, channelId: Snowflake, user: Optional<DiscordUser> = Optional.Missing(), name: String?, avatar: String?, token: Optional<String> = Optional.Missing(), applicationId: Snowflake?)

Properties

Link copied to clipboard
@SerialName(value = "application_id")
val applicationId: Snowflake?
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "channel_id")
val channelId: Snowflake
Link copied to clipboard
@SerialName(value = "guild_id")
val guildId: OptionalSnowflake
Link copied to clipboard
Link copied to clipboard
val name: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard