CreateGroupBuilder
Namespace: Signal.Bot
Full Name: Signal.Bot.CreateGroupBuilder
Summary
Provides a fluent interface for building and configuring CreateGroupRequest objects to create new Signal groups.
Methods
#ctor
#ctor(number)Initializes a new instance of the CreateGroupBuilder class with default admin-only permissions.
Parameters:
number- The phone number of the Signal account creating the group.
WithName
WithName(name)Sets the name of the group.
Parameters:
name- The name for the new group.
Returns: The builder instance for method chaining.
WithDescription
WithDescription(description)Sets the description text for the group.
Parameters:
description- The description for the new 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.
WithMembers
WithMembers(members)Sets the initial members of the group.
Parameters:
members- The phone numbers of users to add as initial group members.
Returns: The builder instance for method chaining.
Build
Build()Builds and returns the configured CreateGroupRequest.
Returns: The configured CreateGroupRequest instance.
