Skip to content

Commit 6c4072e

Browse files
Add the applied_tags field to ExecuteWebhook (#3437)
Allows webhooks to create forum threads with tags applied to them.
1 parent b5ec750 commit 6c4072e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/builder/execute_webhook.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ pub struct ExecuteWebhook {
7575
flags: Option<MessageFlags>,
7676
#[serde(skip_serializing_if = "Option::is_none")]
7777
thread_name: Option<String>,
78+
#[serde(skip_serializing_if = "Option::is_none")]
79+
applied_tags: Option<Vec<ForumTagId>>,
7880
attachments: EditAttachments,
7981

8082
#[serde(skip)]
@@ -343,6 +345,12 @@ impl ExecuteWebhook {
343345
self
344346
}
345347

348+
/// Tags for thread being created (requires the webhook channel to be a forum channel)
349+
pub fn applied_tags(mut self, applied_tags: Vec<ForumTagId>) -> Self {
350+
self.applied_tags = Some(applied_tags);
351+
self
352+
}
353+
346354
/// Allows sending non interactive components on non application owned webhooks.
347355
pub fn with_components(mut self, with_components: bool) -> Self {
348356
self.with_components = Some(with_components);

0 commit comments

Comments
 (0)