WebhookManager class
A manager for Webhooks.
- Inheritance
-
- Object
- ReadOnlyManager<
Webhook> - Manager<
Webhook> - WebhookManager
Constructors
-
WebhookManager(CacheConfig<
Webhook> config, NyxxRest client) - Create a new WebhookManager.
Properties
Methods
-
create(
covariant WebhookBuilder builder, {String? auditLogReason}) → Future< Webhook> -
Create a new instance of the type of this manager.
override
-
delete(
Snowflake id, {String? token, String? auditLogReason}) → Future< void> -
Delete the item with the given
id
from the API.override -
deleteWebhookMessage(
Snowflake webhookId, Snowflake messageId, {required String token, Snowflake? threadId}) → Future< void> - Delete a message sent by a webhook.
-
execute(
Snowflake id, MessageBuilder builder, {required String token, bool? wait, Snowflake? threadId, String? threadName, List< Snowflake> ? appliedTags, String? username, String? avatarUrl}) → Future<Message?> - Execute a webhook.
-
fetch(
Snowflake id, {String? token}) → Future< Webhook> -
Fetch the item with the given
id
from the API.override -
fetchChannelWebhooks(
Snowflake channelId) → Future< List< Webhook> > - Fetch the webhooks in a channel.
-
fetchGuildWebhooks(
Snowflake guildId) → Future< List< Webhook> > - Fetch the webhooks in a guild.
-
fetchWebhookMessage(
Snowflake webhookId, Snowflake messageId, {required String token, Snowflake? threadId}) → Future< Message> - Fetch a message sent by a webhook.
-
get(
Snowflake id) → Future< Webhook> -
Get an item by its
id
from the cache if it exists, else fetch it from the API.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Map< String, Object?> raw) → Webhook -
Parse the
raw
data received from the API into an instance of the type of this manager.override -
parseWebhookAuthor(
Map< String, Object?> raw) → WebhookAuthor -
Parse a WebhookAuthor from
raw
. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Snowflake id, covariant WebhookUpdateBuilder builder, {String? token, String? auditLogReason}) → Future< Webhook> -
Update the item with the given
id
in the API.override -
updateWebhookMessage(
Snowflake webhookId, Snowflake messageId, MessageUpdateBuilder builder, {required String token, Snowflake? threadId}) → Future< Message> - Update a message sent by a webhook.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Snowflake id) → PartialWebhook -
Return a partial instance of the entity with ID
id
containing no data.override