Webhook class

Webhooks are a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.

Inheritance
Implemented types

Properties

avatarHash String?
Webhooks avatar hash
latefinal
bot bool
True if bot or webhook
no setteroverride
channel CacheableTextChannel<TextGuildChannel>?
The webhook's channel, if this is accessed using a normal client and the client has that channel in it's cache.
latefinal
client INyxx
Reference to Nyxx object
final
createdAt DateTime
Gets creation timestamp included in Snowflake
no setterinherited
defaultAvatarId int
Default webhook avatar id
no setter
discriminator int
User Discriminator. -1 if webhook
no setteroverride
guild Cacheable<Snowflake, Guild>?
The webhook's guild, if this is accessed using a normal client and the client has that guild in it's cache.
latefinal
hashCode int
The hash code for this object.
no setterinherited
id Snowflake
ID of entity as Snowflake
finalinherited
name String?
The webhook's name.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
User tag: l7ssha#6712
no setteroverride
token String
The webhook's token. Defaults to empty string
latefinal
type WebhookType?
Webhook type
latefinal
user User?
The user, if this is accessed using a normal client.
latefinal
username String
User name
no setteroverride

Methods

avatarURL({String format = "webp", int size = 128}) String
Url to user avatar
override
delete({String? auditReason}) Future<void>
Deletes the webhook.
edit({String? name, SnowflakeEntity? channel, AttachmentBuilder? avatarAttachment, String? auditReason}) Future<Webhook>
Edits the webhook.
execute(MessageBuilder builder, {bool? wait, Snowflake? threadId, String? avatarUrl, String? username}) Future<Message?>
Executes webhook.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of this object.
override

Operators

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