Webhook class
Webhook structure
https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-structure
- Annotations
-
- @JsonSerializable(includeIfNull: false)
Constructors
- Webhook({required String id, required WebhookType type, String? guildId, String? channelId, User? user, String? name, String? avatar, String? token, required String applicationId, Guild? sourceGuild, Channel? sourceChannel, String? url})
- Constructor
-
Webhook.fromJson(Map<
String, dynamic> json) -
From json
factory
Properties
- applicationId → String
-
the bot/OAuth2 application that created this webhook
final
- avatar → String?
-
the default user avatar hash of the webhook
final
- channelId → String?
-
the channel id this webhook is for, if any
final
- guildId → String?
-
the guild id this webhook is for, if any
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
the id of the webhook
final
- name → String?
-
the default name of the webhook
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceChannel → Channel?
-
the channel that this webhook is following (returned for Channel Follower
Webhooks)
final
- sourceGuild → Guild?
-
the guild of the channel that this webhook is following (returned for
Channel Follower Webhooks)
final
- token → String?
-
the secure token of the webhook (returned for Incoming Webhooks)
final
- type → WebhookType
-
the type of the webhook
final
- url → String?
-
the url used for executing the webhook (returned by the webhooks OAuth2
flow)
final
- user → User?
-
the user this webhook was created by (not returned when getting a webhook
with its token)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - To json
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited