createWebhook abstract method
- @POST.new('/channels/{channel_id}/webhooks')
- @Path.new('channel_id') required SnowflakeType channelId,
- @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,
});