Feat: Show member count in soundboard channel dropdown

Add voice channel member count (non-bot users) to soundboard
channel API response and display it in the dropdown, matching
the radio plugin's existing behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-06 20:02:00 +01:00
parent 9aefc3d470
commit dd71d763cd
2 changed files with 8 additions and 4 deletions

View file

@ -27,6 +27,7 @@ type VoiceChannelInfo = {
guildName: string;
channelId: string;
channelName: string;
members?: number;
selected?: boolean;
};
@ -869,7 +870,7 @@ export default function SoundboardTab({ data }: SoundboardTabProps) {
>
<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 && (
@ -884,7 +885,7 @@ export default function SoundboardTab({ data }: SoundboardTabProps) {
onClick={() => handleChannelSelect(ch)}
>
<span className="material-icons co-icon">volume_up</span>
{ch.channelName}
{ch.channelName}{ch.members ? ` (${ch.members})` : ''}
</div>
))}
</React.Fragment>