Webhook class Null safety
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
- Object
- SnowflakeEntity
- Webhook
- Implemented types
Properties
- avatarHash ↔ String?
-
Webhooks avatar hash
read / write, final, late
- bot → bool
-
True if bot or webhook
read-only, override
-
channel
↔ Cacheable<
Snowflake, TextGuildChannel> ? -
The webhook's channel, if this is accessed using a normal client and the client has that channel in it's cache.
read / write, final, late
- client → Nyxx
-
Reference to Nyxx object
final
- createdAt → DateTime
-
Gets creation timestamp included in Snowflake
read-only, inherited
- defaultAvatarId → int
-
Default webhook avatar id
read-only
- discriminator → int
-
User Discriminator. -1 if webhook
read-only, override
-
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.
read / write, final, late
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- id → Snowflake
-
ID of entity as Snowflake
final, inherited
- name ↔ String?
-
The webhook's name.
read / write, final, late
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- tag → String
-
User tag:
l7ssha#6712
read-only, override - token ↔ String
-
The webhook's token. Defaults to empty string
read / write, final, late
- type ↔ WebhookType?
-
Webhook type
read / write, final, late
- user ↔ User?
-
The user, if this is accessed using a normal client.
read / write, final, late
- username → String
-
User name
read-only, override
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, File? avatarFile, List< int> ? avatarBytes, String? encodedAvatar, String? encodedExtension, String? auditReason}) → Future<Webhook> - Edits the webhook.
-
execute(
{dynamic content, List< AttachmentBuilder> ? files, List<EmbedBuilder> ? embeds, bool? tts, AllowedMentions? allowedMentions, bool? wait, String? avatarUrl}) → Future<Message> -
Executes webhook. Webhooks can send multiple embeds in one messsage using
embeds
. [...] -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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