Overview
Communities (also called guilds) are the foundation of Fluxer’s organization system. They provide structured spaces where members can communicate through text, voice, and video channels with granular permission controls.
Guild Structure
Channels Text, voice, and announcement channels organized by category
Roles & Permissions Hierarchical role system with granular permission control
Members User membership with custom nicknames and roles
Customization Icons, banners, splash screens, and branding
Creating a Guild
import { GuildService } from '@fluxer/api/src/guild/GuildService' ;
const guild = await guildService . createGuild ({
user ,
name: 'My Awesome Community' ,
icon: 'data:image/png;base64,...' , // Optional
channels: [
{
name: 'general' ,
type: ChannelTypes . GUILD_TEXT
},
{
name: 'Voice' ,
type: ChannelTypes . GUILD_VOICE
}
]
});
New guilds automatically create a default role (@everyone) and a system channel for announcements.
Channels
Channels are the primary communication spaces within guilds.
Channel Types
Text Channels
Voice Channels
Categories
Announcement Channels
const textChannel = await channelService . createGuildChannel ({
guildId ,
name: 'general-chat' ,
type: ChannelTypes . GUILD_TEXT ,
topic: 'General discussion' ,
position: 0 ,
parentId: categoryId , // Optional: place in category
rateLimitPerUser: 5 , // Slowmode: 5 seconds
nsfw: false
});
Features:
Markdown-formatted messages
Rich embeds and attachments
Reactions and threads
Message history and search
Slowmode rate limiting
const voiceChannel = await channelService . createGuildChannel ({
guildId ,
name: 'General Voice' ,
type: ChannelTypes . GUILD_VOICE ,
position: 1 ,
parentId: categoryId ,
bitrate: 64000 , // 64 kbps
userLimit: 10 , // Max 10 users
rtcRegion: 'us-east' // Preferred voice region
});
Features:
Real-time voice communication
Video and screen sharing
Regional voice servers
User limits and bitrate controls
Permission-based speak/stream access
const category = await channelService . createGuildChannel ({
guildId ,
name: 'Community Channels' ,
type: ChannelTypes . GUILD_CATEGORY ,
position: 0
});
// Channels inherit category permissions by default
Purpose:
Organize related channels
Apply bulk permission overrides
Collapse/expand channel groups in UI
const announcementChannel = await channelService . createGuildChannel ({
guildId ,
name: 'announcements' ,
type: ChannelTypes . GUILD_ANNOUNCEMENT ,
topic: 'Important community updates'
});
Use Cases:
Server announcements
One-way communication
Crossposting to other guilds
Channel Organization
Create Categories
Organize channels into logical groups like “Text Channels”, “Voice Channels”, “Community”.
Set Positions
Use the position field to order channels within categories. Lower numbers appear first.
Configure Permissions
Set category-level permissions that children inherit, then override specific channels as needed.
Apply Naming Convention
Use consistent naming: #general, #announcements, Voice Chat, AFK.
Roles and Permissions
Roles define what members can do within the guild.
Role Hierarchy
// Higher position = higher in hierarchy
const adminRole = await roleService . createRole ({
guildId ,
name: 'Admin' ,
color: 0xE74C3C , // Red
position: 10 ,
permissions: {
ADMINISTRATOR: true // Grants all permissions
},
hoist: true , // Display separately in member list
mentionable: true
});
const moderatorRole = await roleService . createRole ({
guildId ,
name: 'Moderator' ,
color: 0x3498DB , // Blue
position: 5 ,
permissions: {
MANAGE_MESSAGES: true ,
KICK_MEMBERS: true ,
BAN_MEMBERS: true ,
MUTE_MEMBERS: true
},
hoist: true
});
Permission System
Fluxer uses a hierarchical permission system:
Base Permissions
Guild-level permissions from the @everyone role
Role Permissions
Permissions from assigned roles (additive - higher roles override)
Channel Overrides
Channel-specific permission overrides for roles or members
Permission Resolution
ADMINISTRATOR permission bypasses all checks
Common Permissions
Administrative Permissions
ADMINISTRATOR - All permissions, bypasses channel overrides
MANAGE_GUILD - Modify guild settings
MANAGE_ROLES - Create and assign roles
MANAGE_CHANNELS - Create, edit, delete channels
MANAGE_WEBHOOKS - Manage webhooks
MANAGE_EXPRESSIONS - Manage custom emojis and stickers
KICK_MEMBERS - Remove members from guild
BAN_MEMBERS - Ban members from guild
TIMEOUT_MEMBERS - Temporarily restrict member communication
MANAGE_MESSAGES - Delete messages, pin messages
MANAGE_NICKNAMES - Change other members’ nicknames
MUTE_MEMBERS - Server mute in voice channels
DEAFEN_MEMBERS - Server deafen in voice channels
MOVE_MEMBERS - Move members between voice channels
VIEW_CHANNEL - See channels
SEND_MESSAGES - Send messages in text channels
EMBED_LINKS - Embed links in messages
ATTACH_FILES - Upload files
ADD_REACTIONS - React to messages
USE_EXTERNAL_EMOJIS - Use emojis from other guilds
MENTION_EVERYONE - Use @everyone and @here
READ_MESSAGE_HISTORY - View old messages
CONNECT - Join voice channels
SPEAK - Speak in voice channels
STREAM - Screen share/stream
VIDEO - Use video in voice channels
Channel Permission Overrides
import { ChannelPermissionOverwrite } from '@fluxer/api/src/models/ChannelPermissionOverwrite' ;
// Deny @everyone from sending messages in announcements
await channelService . updateChannel ({
channelId: announcementChannelId ,
permissionOverwrites: [
{
id: everyoneRoleId ,
type: 0 , // Role
allow: Permissions . VIEW_CHANNEL ,
deny: Permissions . SEND_MESSAGES
},
{
id: moderatorRoleId ,
type: 0 ,
allow: Permissions . SEND_MESSAGES | Permissions . MANAGE_MESSAGES ,
deny: 0 n
}
]
});
Member Management
Adding Members
// Members join via invite links
const invite = await inviteService . createInvite ({
channelId ,
maxAge: 86400 , // 24 hours
maxUses: 10 ,
temporary: false
});
// Use invite code: /invite/{code}
Assigning Roles
await guildMemberService . addRole ({
guildId ,
userId: memberId ,
roleId: moderatorRoleId
});
await guildMemberService . removeRole ({
guildId ,
userId: memberId ,
roleId: roleId
});
Member Moderation
// Timeout (mute) a member
await guildMemberService . updateMember ({
guildId ,
userId: memberId ,
communicationDisabledUntil: new Date ( Date . now () + 3600000 ) // 1 hour
});
Guild Features
Guilds can have premium features that unlock additional capabilities:
MORE_EMOJI Increased emoji slots (100 static, 100 animated)
MORE_STICKERS Increased sticker slots (100)
UNLIMITED_EMOJI Unlimited emoji and sticker slots
VANITY_URL Custom invite URL: fluxer.gg/yourcommunity
BANNER Guild banner images
INVITE_SPLASH Custom splash screen on invites
// Check guild features
if ( guild . features . includes ( GuildFeatures . MORE_EMOJI )) {
// Allow more emojis
}
if ( guild . features . includes ( GuildFeatures . VANITY_URL )) {
// Show vanity URL settings
}
Guild Customization
Visual Branding
await guildService . updateGuild ({
guildId ,
icon: 'data:image/png;base64,...' // 1024x1024 recommended
});
// Requires BANNER feature
await guildService . updateGuild ({
guildId ,
banner: 'data:image/png;base64,...' , // 960x540 recommended
bannerWidth: 960 ,
bannerHeight: 540
});
// Requires INVITE_SPLASH feature
await guildService . updateGuild ({
guildId ,
splash: 'data:image/png;base64,...' ,
splashWidth: 1920 ,
splashHeight: 1080 ,
splashCardAlignment: GuildSplashCardAlignment . CENTER
});
System Channels
await guildService . updateGuild ({
guildId ,
systemChannelId: channelId ,
systemChannelFlags: SystemChannelFlags . SUPPRESS_JOIN_NOTIFICATIONS ,
rulesChannelId: rulesChannelId , // For community guidelines
afkChannelId: afkVoiceChannelId ,
afkTimeout: 300 // 5 minutes
});
Disabled Operations
Guild owners can temporarily disable certain features:
import { GuildOperations } from '@fluxer/constants/src/GuildConstants' ;
await guildService . updateGuild ({
guildId ,
disabledOperations: GuildOperations . SEND_MESSAGE | GuildOperations . REACTIONS
});
// Check if operation is disabled
if ( guild . disabledOperations & GuildOperations . SEND_MESSAGE ) {
throw new FeatureTemporarilyDisabledError ();
}
Message History Cutoff
Control how far back members can read messages:
// Set history cutoff to 30 days ago
await guildService . updateGuild ({
guildId ,
messageHistoryCutoff: new Date ( Date . now () - 30 * 86400000 )
});
// Members without READ_MESSAGE_HISTORY permission
// can only see messages after this date
Best Practices
Plan Your Structure
Design channel categories and roles before inviting members. It’s harder to reorganize a populated guild.
Use Role Hierarchy
Keep admin roles at the top, moderation in the middle, and member roles at the bottom. This prevents privilege escalation.
Set Clear Permissions
Use channel overrides sparingly. Most permissions should come from roles for easier management.
Create Welcome Channels
Set up a read-only rules/welcome channel with important information for new members.
Monitor Audit Logs
Enable audit log indexing to track administrative actions and changes. await guildService . updateGuild ({
guildId ,
auditLogsIndexedAt: new Date ()
});
Voice & Video Learn about voice channels and calls
Messaging Understand messaging in guild channels
Custom Expressions Add custom emojis and stickers
API Reference Complete API documentation