verboseChannelMention: don't use # for voice channels

This commit is contained in:
Dragory 2021-04-10 23:42:24 +03:00
parent e0a659be4a
commit 1d0f7636c2
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1216,7 +1216,11 @@ export function verboseUserName(user: User | UnknownUser): string {
}
export function verboseChannelMention(channel: GuildChannel): string {
return `<#${channel.id}> (**#${channel.name}**, \`${channel.id}\`)`;
const plainTextName =
channel.type === Constants.ChannelTypes.GUILD_VOICE || channel.type === Constants.ChannelTypes.GUILD_STAGE
? channel.name
: `#${channel.name}`;
return `<#${channel.id}> (**${plainTextName}**, \`${channel.id}\`)`;
}
export function messageLink(message: Message): string;