Feat: Show member count in channel dropdown

Add voice channel member count (non-bot users) to channel API
response and display it in the dropdown button and menu options.
Shows (N) suffix when users are in a channel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-06 20:04:27 +01:00
parent ac96896055
commit 4875747dc5
3 changed files with 9 additions and 5 deletions

View file

@ -610,7 +610,7 @@ export default function App() {
>
<span className="material-icons cb-icon">headset</span>
{selected && <span className="channel-status" />}
<span className="channel-label">{selectedChannel?.channelName || 'Channel...'}</span>
<span className="channel-label">{selectedChannel ? `${selectedChannel.channelName}${selectedChannel.members ? ` (${selectedChannel.members})` : ''}` : 'Channel...'}</span>
<span className={`material-icons chevron`}>expand_more</span>
</button>
{channelOpen && (
@ -625,7 +625,7 @@ export default function App() {
onClick={() => handleChannelSelect(ch)}
>
<span className="material-icons co-icon">volume_up</span>
{ch.channelName}
{ch.channelName}{ch.members ? ` (${ch.members})` : ''}
</div>
))}
</React.Fragment>

View file

@ -20,6 +20,7 @@ export type VoiceChannelInfo = {
guildName: string;
channelId: string;
channelName: string;
members?: number;
selected?: boolean;
};