Skip to content

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

csharp
#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

csharp
WithName(name)

Sets the name of the group.

Parameters:

  • name - The name for the new group.

Returns: The builder instance for method chaining.

WithDescription

csharp
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

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.

WithMembers

csharp
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

csharp
Build()

Builds and returns the configured CreateGroupRequest.

Returns: The configured CreateGroupRequest instance.