Webhook class

A non authenticated way to send messages to a Discord channel.

External references:

Inheritance

Properties

application PartialApplication?
The application that created this webhook.
no setter
applicationId Snowflake?
The ID of the application that created this webhook.
final
avatarHash String?
The hash of this webhook's default avatar image.
final
channel PartialChannel?
The channel this webhook is for, if any.
no setter
channelId Snowflake?
The ID of the channel this webhook is for, if any.
final
guild PartialGuild?
The guild this webhook is for, if any.
no setter
guildId Snowflake?
The ID of the guild this webhook is for, if any.
final
hashCode int
The hash code for this object.
no setterinherited
id Snowflake
The id of this entity.
finalinherited
manager WebhookManager
The manager for this entity.
finalinherited
name String?
The default name of this webhook.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceChannel PartialChannel?
If this is a WebhookType.channelFollower, this webhook's source channel.
final
sourceGuild PartialGuild?
final
token String?
If this is a WebhookType.incoming webhook, this webhook's token.
final
type WebhookType
The type of this webhook.
final
url Uri?
The URL to use to execute the webhook.
final
user User?
The user this webhook was created by.
final

Methods

defaultToString() String
Same as toString, but only called when dart:mirrors is not available.
inherited
delete({String? token, String? auditLogReason}) Future<void>
Delete this webhook.
inherited
deleteMessage(Snowflake messageId, {required String token, Snowflake? threadId}) Future<void>
Delete a message sent by this webhook using its token.
inherited
execute(MessageBuilder builder, {required String token, bool? wait, Snowflake? threadId, String? threadName, List<Snowflake>? appliedTags, String? username, String? avatarUrl}) Future<Message?>
Execute this webhook using its token.
inherited
fetch() Future<Webhook>
Fetch this entity from the API.
inherited
fetchMessage(Snowflake messageId, {required String token, Snowflake? threadId}) Future<Message>
Fetch a message sent by this webhook using its token.
inherited
get() Future<Webhook>
If this entity exists in the manager's cache, return the cached instance. Otherwise, fetch this entity and return it.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(covariant WebhookUpdateBuilder builder, {String? token, String? auditLogReason}) Future<Webhook>
Update this webhook, returning the updated webhook.
inherited
updateMessage(Snowflake messageId, MessageUpdateBuilder builder, {required String token, Snowflake? threadId}) Future<Message>
Update a message sent by this webhook using its token.
inherited

Operators

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