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
#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
WithName(name)Sets the name of the group.
Parameters:
name- The new name for the group.
Returns: The builder instance for method chaining.
WithDescription
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
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.
WithGroupLink
WithGroupLink(link)Sets the group link access level.
Parameters:
link- TheGroupLinksetting controlling how users can join via link.
Returns: The builder instance for method chaining.
WithAddMemberPermission
WithAddMemberPermission(addMember)Sets the permission level for adding new members to the group.
Parameters:
addMember- TheGroupPermissionlevel (e.g., OnlyAdmins or EveryMember).
Returns: The builder instance for method chaining.
WithEditGroupPermission
WithEditGroupPermission(editGroup)Sets the permission level for editing group information (name, description, avatar).
Parameters:
editGroup- TheGroupPermissionlevel (e.g., OnlyAdmins or EveryMember).
Returns: The builder instance for method chaining.
WithSendMessagesPermission
WithSendMessagesPermission(sendMessages)Sets the permission level for sending messages in the group.
Parameters:
sendMessages- TheGroupPermissionlevel (e.g., OnlyAdmins or EveryMember).
Returns: The builder instance for method chaining.
WithAvatar
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
Build()Builds and returns the configured UpdateGroupRequest.
Returns: The configured UpdateGroupRequest instance.
