Skip to content

Commit adeb849

Browse files
authored
Use display name for temp rooms (#183)
Fixes #99
1 parent 6883dde commit adeb849

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/events/voiceStateUpdate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ async function handleChannelJoin(oldState: VoiceState, newState: VoiceState): Pr
5151
logger.debug(`User ${member.user.username} joined jump channel ${channel.name}`);
5252

5353
// Create a new temporary voice channel
54+
// Use displayName to get the server nickname, falling back to username
5455
const newChannel = await guild.channels.create({
55-
name: `~${member.user.username}`,
56+
name: `~${member.displayName}`,
5657
type: ChannelType.GuildVoice,
5758
parent: channel.parent ?? undefined,
5859
reason: 'Creating temporary voice channel',

0 commit comments

Comments
 (0)