IWebhook class abstract

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

Implemented types

Constructors

IWebhook()

Properties

avatarHash String?
Webhooks avatar hash
read-only
bot bool
True if bot or webhook
read-onlyinherited
channel ICacheableTextChannel<ITextGuildChannel>?
The webhook's channel, if this is accessed using a normal client and the client has that channel in it's cache.
read-only
client INyxx
Reference to NyxxWebsocket object
read-only
createdAt DateTime
Gets creation timestamp included in Snowflake
read-onlyinherited
defaultAvatarId int
Default webhook avatar id
read-only
discriminator int
User Discriminator. -1 if webhook
read-onlyinherited
formattedDiscriminator String
Formatted discriminator with leading zeros if needed
read-onlyinherited
guild Cacheable<Snowflake, IGuild>?
The webhook's guild, if this is accessed using a normal client and the client has that guild in it's cache.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
id Snowflake
ID of entity as Snowflake
finalinherited
isInteractionWebhook bool
Whether this IMessageAuthor is a webhook received by an interaction.
read-onlyinherited
name String?
The webhook's name.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
tag String
User tag: l7ssha#6712
read-onlyinherited
token String
The webhook's token. Defaults to empty string
read-only
type WebhookType?
Webhook type
read-only
user IUser?
The user, if this is accessed using a normal client.
read-only
username String
User name
read-onlyinherited

Methods

avatarUrl({String format = 'webp', int? size, bool animated = true}) String
The user's avatar, represented as URL. In case if user does not have avatar, default discord avatar will be returned; format, size and animated will no longer affectng this URL. If animated is set as true, if available, the url will be a gif, otherwise the format.
override
delete({String? auditReason}) Future<void>
Deletes the webhook.
edit({String? name, SnowflakeEntity? channel, AttachmentBuilder? avatarAttachment, String? auditReason}) Future<IWebhook>
Edits the webhook.
execute(MessageBuilder builder, {bool wait = true, Snowflake? threadId, String? threadName, String? avatarUrl, String? username}) Future<IMessage?>
Executes webhook.
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 ==(dynamic other) bool
The equality operator.
inherited