createWebhook abstract method

  1. @POST.new('/channels/{channel_id}/webhooks')
Future<WebhookResponse> createWebhook({
  1. @Path.new('channel_id') required SnowflakeType channelId,
  2. @Body.new() required WebhookCreateRequest body,
})

Create webhook.

Creates a new webhook in the specified channel with the provided name and optional avatar. Returns the newly created webhook object including its ID and token.

channelId - The ID of the channel.

body - Name not received - field will be skipped.

Implementation

@POST('/channels/{channel_id}/webhooks')
Future<WebhookResponse> createWebhook({
  @Path('channel_id') required SnowflakeType channelId,
  @Body() required WebhookCreateRequest body,
});