Webhook class

Constructors

Webhook(Snowflake _id, int _type, Snowflake? _guildId, Snowflake? _channelId, Snowflake? _creatorId, String? _label, String? _avatar, String _token, Snowflake? _applicationId, String? _url, SourceChannel? _sourceChannel, SourceGuild? _sourceGuild)
Webhook.from({required dynamic payload})
factory

Properties

applicationId Snowflake?
no setter
avatar String?
no setter
channel GuildChannel?
no setter
createdAt DateTime
no setter
creator User?
no setter
guild Guild?
no setter
hashCode int
The hash code for this object.
no setterinherited
id Snowflake
no setter
label String?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceChannel → SourceChannel?
no setter
sourceGuild → SourceGuild?
no setter
token String
no setter
type → WebhookType
no setter
url String?
no setter

Methods

delete({String? reason}) Future<bool>
Delete this
execute({String? content, String? username, String? avatarUrl, bool? tts, List<EmbedBuilder>? embeds, List<RowBuilder>? components, bool? suppressEmbed}) Future<void>
Send a message from the webhook
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAvatar(String avatar, {String? reason}) Future<void>
Update the avatar of this
setChannel(Snowflake channelId, {String? reason}) Future<void>
Update the avatar of this
setLabel(String label, {String? reason}) Future<void>
Update the label of this
toString() String
A string representation of this object.
inherited
update({String? label, String? avatar, String? reason}) Future<void>
Updates multiple properties of this in a single request.

Operators

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