Skip to main content
Complete reference for all community-related Protocol Buffer messages.

GetCommunities

Retrieve all communities the user is a member of. Request: communities.GetCommunitiesResponse: communities.Communities No parameters.

Communities

communities
types.Community[]
Array of community objects
community_user_info
CommunityUserInfo[]
Array of user-specific community information
unavailable
fixed64[]
Snowflake IDs of unavailable communities

CommunityUserInfo

community_id
fixed64
Snowflake ID of the community
unread_count
int32
Number of unread messages in the community

GetChannels

Retrieve all channels in a community. Request: communities.GetChannelsResponse: communities.Channels
community_id
fixed64
required
Snowflake ID of the community

Channels

conversations
types.Conversation[]
Array of conversation objects
channels
types.Channel[]
Array of channel objects
messages
types.Message[]
Array of message objects

CreateCommunity

Create a new community. Request: communities.CreateCommunityResponse: ()
name
string
required
Name of the community

CreateChannel

Create a new channel in a community. Request: communities.CreateChannelResponse: ()
community_id
fixed64
required
Snowflake ID of the community
name
string
required
Name of the channel
type
types.ChannelType
required
Type of the channel
parent_id
fixed64
Snowflake ID of the parent channel (optional)

DeleteChannel

Delete a channel. Request: communities.DeleteChannelResponse: ()
channel
refs.ChannelRef
required
Reference to the channel to delete

EditChannel

Edit channel properties. Request: communities.EditChannelResponse: ()
channel
refs.ChannelRef
required
Reference to the channel
name
string
New name for the channel (optional)
position
uint32
New position for the channel (optional)
parent_id
fixed64
Snowflake ID of the new parent channel (optional)

GetChannelMembers

Retrieve members of a channel. Request: communities.GetChannelMembersResponse: communities.MemberList
community_id
fixed64
required
Snowflake ID of the community
channel_id
fixed64
required
Snowflake ID of the channel

Members

members
types.CommunityMember[]
Array of community member objects
users
types.User[]
Array of user objects

MemberList

entries
updates.MemberListEntry[]
Array of member list entries

EditPhoto

Edit community photo. Request: communities.EditPhotoResponse: ()
community_id
fixed64
required
Snowflake ID of the community
file
media.UploadedFileRef
Reference to the uploaded photo file (optional, omit to remove photo)

GetRoles

Fetch roles in the community that the user is allowed to see. Request: communities.GetRolesResponse: communities.CommunityRoles
community_id
fixed64
required
Snowflake ID of the community

CommunityRoles

roles
types.CommunityRole[]
Array of role objects
default_permissions
fixed64
Default permissions for all members

CreateRole

Create a new role in a community. Request: communities.CreateRoleResponse: ()
community_id
fixed64
required
Snowflake ID of the community
name
string
required
Name of the role
permissions
fixed64
required
Permission flags for the role
priority
uint32
required
Priority/position of the role
color
uint32
required
Color of the role
separated
bool
required
Whether members are displayed separately
public
bool
required
Whether the role is publicly assignable

EditRole

Edit an existing role. Request: communities.EditRoleResponse: ()
id
fixed64
required
Snowflake ID of the role
community_id
fixed64
required
Snowflake ID of the community
name
string
required
Name of the role
permissions
fixed64
required
Permission flags for the role
priority
uint32
required
Priority/position of the role
color
uint32
required
Color of the role
separated
bool
required
Whether members are displayed separately
public
bool
required
Whether the role is publicly assignable

DeleteRole

Delete a role from a community. Request: communities.DeleteRoleResponse: ()
id
fixed64
required
Snowflake ID of the role
community_id
fixed64
required
Snowflake ID of the community

EditMember

Edit community member properties. Request: communities.EditMemberResponse: ()
community_id
fixed64
required
Snowflake ID of the community
member_id
fixed64
required
Snowflake ID of the member
nickname
string
Member’s nickname (optional)
role_ids
CommunityMemberRoleIds
Member’s role assignments (optional)

CommunityMemberRoleIds

role_ids
fixed64[]
required
Array of role snowflake IDs

GetChannelOverrides

Retrieve permission overrides for a channel. Request: communities.GetChannelOverridesResponse: communities.ChannelOverrides
community_id
fixed64
required
Snowflake ID of the community
channel_id
fixed64
required
Snowflake ID of the channel

ChannelOverrides

overrides
types.ChannelOverride[]
Array of channel permission overrides

CreateChannelOverride

Create a permission override for a channel. Request: communities.CreateChannelOverrideResponse: communities.ChannelOverride
community_id
fixed64
required
Snowflake ID of the community
channel_id
fixed64
required
Snowflake ID of the channel
role_id
fixed64
required
Snowflake ID of the role
permissions
types.PermissionOverrides
required
Permission overrides to apply

ChannelOverride

override
types.ChannelOverride
The created channel override

DeleteChannelOverride

Delete a permission override from a channel. Request: communities.DeleteChannelOverrideResponse: ()
community_id
fixed64
required
Snowflake ID of the community
channel_id
fixed64
required
Snowflake ID of the channel
role_id
fixed64
required
Snowflake ID of the role

LeaveCommunity

Leave a community. Request: communities.LeaveCommunityResponse: ()
community_id
fixed64
required
Snowflake ID of the community to leave

DeleteCommunity

Delete a community. Request: communities.DeleteCommunityResponse: ()
community_id
fixed64
required
Snowflake ID of the community to delete

EditCommunity

Edit community properties. Request: communities.EditCommunityResponse: ()
community_id
fixed64
required
Snowflake ID of the community
name
string
New name for the community (optional)

RemoveMembers

Remove or ban members from a community. Request: communities.RemoveMembersResponse: communities.RemovedMembers
community_id
fixed64
required
Snowflake ID of the community
member_ids
fixed64[]
required
Snowflake IDs of members to remove
until
fixed64
Unix timestamp until ban expires (optional, zero value = permanent)
delete_messages_since
fixed64
Unix timestamp to delete messages from (optional)
reason
string
Optional reason for removal/ban

RemovedMembers

members
RemovedMember[]
Array of removed members

RemovedMember

user_id
fixed64
Snowflake ID of the removed user
user
types.User
User object
until
fixed64
Unix timestamp until ban expires (optional)
reason
string
Reason for removal (optional)

GetRemovedMembers

Retrieve banned members from a community. Request: communities.GetRemovedMembersResponse: communities.RemovedMembers
community_id
fixed64
required
Snowflake ID of the community

EditDefaultPermissions

Edit default permissions for all community members. Request: communities.EditDefaultPermissionsResponse: ()
community_id
fixed64
required
Snowflake ID of the community
permissions
fixed64
required
New default permission flags

UnbanMembers

Unban members from a community. Request: communities.UnbanMembersResponse: ()
community_id
fixed64
required
Snowflake ID of the community
member_ids
fixed64[]
required
Snowflake IDs of members to unban

GetMembers

Retrieve specific community members. Request: communities.GetMembersResponse: communities.Members
community_id
fixed64
required
Snowflake ID of the community
member_ids
fixed64[]
required
Snowflake IDs of members to retrieve

EditSettings

Edit community settings. Request: communities.EditSettingsResponse: communities.CommunitySettings
community_id
fixed64
required
Snowflake ID of the community
settings
CommunitySettings
required
New settings to apply

CommunitySettings

system_messages
SystemMessages
System message configuration (optional)

SystemMessages

channel_id
fixed64
Snowflake ID of channel for system messages (optional)
join_messages
bool
Whether to send join messages (optional)

Protocol Definition

syntax = "proto3";

package tangle.client.communities;
import "refs.proto";
import "types.proto";
import "media.proto";
import "updates.proto";

// communities.getCommunities -> communities.Communities
message GetCommunities {}

message CommunityUserInfo {
  // @snowflake<Community>
  fixed64 community_id = 1;
  int32 unread_count = 2;
  // in future there will be a mention count here as well
}

message Communities {
  repeated types.Community communities = 1;
  repeated CommunityUserInfo community_user_info = 2;
  // @snowflake<Community>
  repeated fixed64 unavailable = 3;
}

// communities.getChannels -> communities.Channels
message GetChannels {
  // @snowflake<Community>
  fixed64 community_id = 1;
}

message Channels {
  repeated types.Conversation conversations = 1;
  repeated types.Channel channels = 2;
  repeated types.Message messages = 3;
}

// community.createCommunity -> ()
message CreateCommunity { string name = 1; }

// communities.createChannel -> ()
message CreateChannel {
  // @snowflake<Community>
  fixed64 community_id = 1;
  string name = 2;
  types.ChannelType type = 3;
  // @snowflake<Channel>
  optional fixed64 parent_id = 4;
}

// communities.deleteChannel -> ()
message DeleteChannel { refs.ChannelRef channel = 1; }

// communities.editChannel -> ()
message EditChannel {
  refs.ChannelRef channel = 1;
  optional string name = 2;
  optional uint32 position = 3;
  // @snowflake<Channel>
  optional fixed64 parent_id = 4;
}

// communities.GetChannelMembers -> communities.MemberList
message GetChannelMembers {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<Channel>
  fixed64 channel_id = 2;
}

message Members {
  repeated types.CommunityMember members = 1;
  repeated types.User users = 2;
}

message MemberList { repeated updates.MemberListEntry entries = 1; }

// communities.editPhoto -> ()
message EditPhoto {
  // @snowflake<Community>
  fixed64 community_id = 1;
  optional media.UploadedFileRef file = 2;
}

// Fetches roles in the community that the user is allowed to see.
// Meant to be admin only, currently not enforced until Member List v2
//
// communities.getRoles -> communities.CommunityRoles
message GetRoles {
  // @snowflake<Community>
  fixed64 community_id = 1;
}

message CommunityRoles {
  repeated types.CommunityRole roles = 1;
  fixed64 default_permissions = 2;
}

// communities.createRole -> ()
message CreateRole {
  // @snowflake<Community>
  fixed64 community_id = 2;
  string name = 3;
  fixed64 permissions = 4;
  uint32 priority = 5;
  uint32 color = 6;
  bool separated = 7;
  bool public = 8;
}

// communities.editRole -> ()
message EditRole {
  // @snowflake<Role>
  fixed64 id = 1;
  // @snowflake<Community>
  fixed64 community_id = 2;
  string name = 3;
  fixed64 permissions = 4;
  uint32 priority = 5;
  uint32 color = 6;
  bool separated = 7;
  bool public = 8;
}

// communities.deleteRole -> ()
message DeleteRole {
  // @snowflake<Role>
  fixed64 id = 1;
  // @snowflake<Community>
  fixed64 community_id = 2;
}

// communities.editMember -> ()
message EditMember {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<User>
  fixed64 member_id = 2;
  optional string nickname = 3;
  optional CommunityMemberRoleIds role_ids = 4;
}

message CommunityMemberRoleIds { // out here cus nested snowflake
  // @snowflake<Role>
  repeated fixed64 role_ids = 1;
}

// communities.getChannelOverrides -> communities.ChannelOverrides
message GetChannelOverrides {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<Channel>
  fixed64 channel_id = 2;
}

message ChannelOverrides { repeated types.ChannelOverride overrides = 1; }

// communities.createChannelOverride -> communities.ChannelOverride
message CreateChannelOverride {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<Channel>
  fixed64 channel_id = 2;
  // @snowflake<Role>
  fixed64 role_id = 3;
  types.PermissionOverrides permissions = 4;
}

message ChannelOverride { types.ChannelOverride override = 1; }

// communities.deleteChannelOverride -> ()
message DeleteChannelOverride {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<Channel>
  fixed64 channel_id = 2;
  // @snowflake<Role>
  fixed64 role_id = 3;
}

// communities.leaveCommunity -> ()
message LeaveCommunity {
  // @snowflake<Community>
  fixed64 community_id = 1;
}

// communities.deleteCommunity -> ()
message DeleteCommunity {
  // @snowflake<Community>
  fixed64 community_id = 1;
}

// communities.editCommunity -> ()
message EditCommunity {
  // @snowflake<Community>
  fixed64 community_id = 1;
  optional string name = 2;
}

// Removes a list of members from the community
//
// communities.removeMembers -> RemovedMembers
message RemoveMembers {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<User>
  repeated fixed64 member_ids = 2;
  // Unix timestamp. Zero value results in a permanent ban.
  optional fixed64 until = 3;
  // Unix timestamp.
  optional fixed64 delete_messages_since = 4;
  // Optional reason for removal/ban
  optional string reason = 5;
}

message RemovedMembers {
  message RemovedMember {
    // @snowflake<User>
    fixed64 user_id = 1;
    types.User user = 2;
    optional fixed64 until = 3;
    optional string reason = 4;
  }
  repeated RemovedMember members = 1;
}

// communities.getRemovedMembers -> communities.RemovedMembers
message GetRemovedMembers {
  // @snowflake<Community>
  fixed64 community_id = 1;
}

// Edits default permissions given to all members
// communities.editDefaultPermissions -> ()
message EditDefaultPermissions {
  // @snowflake<Community>
  fixed64 community_id = 1;
  fixed64 permissions = 2;
}

// communities.unbanMembers -> ()
message UnbanMembers {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<User>
  repeated fixed64 member_ids = 2;
}

// communities.getMembers -> communities.Members
message GetMembers {
  // @snowflake<Community>
  fixed64 community_id = 1;
  // @snowflake<User>
  repeated fixed64 member_ids = 2;
}

// communities.editSettings -> communities.CommunitySettings
message EditSettings {
  // @snowflake<Community>
  fixed64 community_id = 1;
  CommunitySettings settings = 2;
}

message CommunitySettings {
  message SystemMessages {
    // @snowflake<Channel>
    optional fixed64 channel_id = 1;
    optional bool join_messages = 2;
  }

  optional SystemMessages system_messages = 1;
}

Build docs developers (and LLMs) love