DiscordWebhook class

Constructors

DiscordWebhook({required DiscordSnowflake id, required int type, DiscordSnowflake? guildId, DiscordSnowflake? channelId, DiscordUser? user, String? name, String? avatar, String? token, DiscordSnowflake? applicationId, DiscordGuild? sourceGuild, DiscordChannel? sourceChannel, String? url})
DiscordWebhook.fromJson(Map<String, dynamic> json)
factory

Properties

applicationId DiscordSnowflake?
the bot/OAuth2 application that created this webhook.
final
avatar String?
the default user avatar hash of the webhook
final
channelId DiscordSnowflake?
the channel id this webhook is for, if any
final
guildId DiscordSnowflake?
the guild id this webhook is for, if any
final
hashCode int
The hash code for this object.
no setterinherited
id DiscordSnowflake
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 DiscordChannel?
the channel that this webhook is following (returned for Channel Follower Webhooks)
final
sourceGuild DiscordGuild?
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 int
the type of the webhook
final
url String?
the url used for executing the webhook (returned by the webhooks OAuth2 flow)
final
user DiscordUser?
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
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

applicationIdEntry → const String
avatarEntry → const String
channelIdEntry → const String
guildIdEntry → const String
idEntry → const String
nameEntry → const String
sourceChannelEntry → const String
sourceGuildEntry → const String
tokenEntry → const String
typeEntry → const String
urlEntry → const String
userEntry → const String