Skip to content

UpdateGroupBuilder

Namespace: Signal.Bot

Full Name: Signal.Bot.UpdateGroupBuilder

Summary

Provides a fluent interface for building and configuring UpdateGroupRequest objects to update Signal group settings.

Methods

#ctor

csharp
#ctor(number, groupId)

Initializes a new instance of the UpdateGroupBuilder class with default admin-only permissions.

Parameters:

  • number - The phone number of the Signal account updating the group.
  • groupId - The unique identifier of the group to update.

WithName

csharp
WithName(name)

Sets the name of the group.

Parameters:

  • name - The new name for the group.

Returns: The builder instance for method chaining.

WithDescription

csharp
WithDescription(description)

Sets the description text for the group.

Parameters:

  • description - The new description for the group.

Returns: The builder instance for method chaining.

WithExpirationTime

csharp
WithExpirationTime(expirationTime)

Sets the disappearing message timer for the group.

Parameters:

  • expirationTime - The expiration time in seconds. Set to 0 to disable disappearing messages.

Returns: The builder instance for method chaining.

csharp
WithGroupLink(link)

Sets the group link access level.

Parameters:

  • link - The GroupLink setting controlling how users can join via link.

Returns: The builder instance for method chaining.

WithAddMemberPermission

csharp
WithAddMemberPermission(addMember)

Sets the permission level for adding new members to the group.

Parameters:

Returns: The builder instance for method chaining.

WithEditGroupPermission

csharp
WithEditGroupPermission(editGroup)

Sets the permission level for editing group information (name, description, avatar).

Parameters:

Returns: The builder instance for method chaining.

WithSendMessagesPermission

csharp
WithSendMessagesPermission(sendMessages)

Sets the permission level for sending messages in the group.

Parameters:

  • sendMessages - The GroupPermission level (e.g., OnlyAdmins or EveryMember).

Returns: The builder instance for method chaining.

WithAvatar

csharp
WithAvatar(avatar)

Sets the group avatar image from a byte array.

Parameters:

  • avatar - The avatar image as a byte array (JPEG or PNG format recommended).

Returns: The builder instance for method chaining.

Build

csharp
Build()

Builds and returns the configured UpdateGroupRequest.

Returns: The configured UpdateGroupRequest instance.