diff --git a/src/grom.gleam b/src/grom.gleam index 93f4106..346d477 100644 --- a/src/grom.gleam +++ b/src/grom.gleam @@ -10769,6 +10769,9 @@ pub opaque type CreateForumLikeThread { ) } +/// Behavior: +/// - the created thread will be a `PublicThread` +/// - requires the `AllowSendingMessages` permission in the forum-like channel pub fn new_forum_like_thread_request( token token: Token, in_channel_with_id channel_id: Snowflake(ForumLikeChannel), @@ -10813,6 +10816,12 @@ pub fn new_forum_like_thread_request( } } +pub fn new_forum_like_thread_response( + response: Response(BitArray), +) -> Result(Thread, RestError) { + handle_response_bits(response, decode_with: thread_decoder()) +} + fn create_forum_like_thread_to_json(create: CreateForumLikeThread) -> Json { [ Ok(#("name", json.string(create.name))),