Skip to content

Commit

Permalink
feat(WebhookParams): add thread_name field (#1412)
Browse files Browse the repository at this point in the history
Add ThreadName field into WebhookParams to allow for creation of forum posts by webhooks.

---------

Co-authored-by: Fedor Lapshin <[email protected]>
  • Loading branch information
merlinfuchs and FedorLap2006 authored Sep 22, 2023
1 parent a2079d3 commit 1f0b57f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ type WebhookParams struct {
// Only MessageFlagsSuppressEmbeds and MessageFlagsEphemeral can be set.
// MessageFlagsEphemeral can only be set when using Followup Message Create endpoint.
Flags MessageFlags `json:"flags,omitempty"`
// Name of the thread to create.
// NOTE: can only be set if the webhook channel is a forum.
ThreadName string `json:"thread_name,omitempty"`
}

// WebhookEdit stores data for editing of a webhook message.
Expand Down

0 comments on commit 1f0b57f

Please sign in to comment.