Skip to main content

What are Communities?

Communities (also known as servers) are organized spaces where users can communicate through channels, organize with roles, and manage permissions. Each community has its own set of channels, roles, and members.

Community Structure

A community consists of:
  • Channels: Text, voice, or category channels where members communicate
  • Roles: Permission groups that can be assigned to members
  • Members: Users who have joined the community
  • Permissions: Granular access control using bitwise flags

Community Type

id
fixed64
Snowflake ID of the community
owner
bool
Whether the current user is the owner of this community
name
string
The name of the community
photo
ChatPhoto
The community’s icon/photo
permissions
fixed64
The current user’s computed permissions in this community (bitwise flags)
muted
bool
Whether the community is muted for the current user

Managing Communities

Get Communities

Retrieve all communities the user is a member of. Method: communities.getCommunities Request: GetCommunities (empty message) Response: Communities
communities
Community[]
List of all communities the user belongs to
community_user_info
CommunityUserInfo[]
User-specific information for each community (unread counts, etc.)
unavailable
fixed64[]
Community IDs that are currently unavailable

Create Community

Create a new community (server). Method: communities.createCommunity Request: CreateCommunity
name
string
The name for the new community

Edit Community

Modify community settings. Method: communities.editCommunity Request: EditCommunity
community_id
fixed64
Snowflake ID of the community to edit
name
string
New name for the community

Edit Photo

Change the community’s icon/photo. Method: communities.editPhoto Request: EditPhoto
community_id
fixed64
Snowflake ID of the community
file
UploadedFileRef
Reference to the uploaded photo file. If omitted, removes the current photo.

Leave Community

Leave a community as a member. Method: communities.leaveCommunity Request: LeaveCommunity
community_id
fixed64
Snowflake ID of the community to leave

Delete Community

Permanently delete a community. Requires ownership. Method: communities.deleteCommunity Request: DeleteCommunity
community_id
fixed64
Snowflake ID of the community to delete

Community Settings

Configure community-wide settings like system messages. Method: communities.editSettings Request: EditSettings
community_id
fixed64
Snowflake ID of the community
settings
CommunitySettings
The settings to apply

CommunitySettings Structure

system_messages
SystemMessages
Configuration for system messages

SystemMessages

channel_id
fixed64
Snowflake ID of the channel where system messages should be sent
join_messages
bool
Whether to send messages when users join the community

Permission System

Communities use a bitwise permission system. See Roles & Permissions for detailed information about the permission flags and how they work.

Build docs developers (and LLMs) love