execute method

Future<Message?> execute(
  1. MessageBuilder builder, {
  2. bool? wait,
  3. Snowflake? threadId,
  4. String? avatarUrl,
  5. String? username,
})

Executes webhook.

wait - waits for server confirmation of message send before response, and returns the created message body (defaults to false; when false a message that is not save does not return an error)

Implementation

Future<Message?> execute(
    MessageBuilder builder,
    {bool? wait,
    Snowflake? threadId,
    String? avatarUrl,
    String? username}) =>
    client.httpEndpoints.executeWebhook(
      this.id,
      builder,
      token: token,
      threadId: threadId,
      username: username,
      wait: wait,
      avatarUrl: avatarUrl
    );