3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 16:25:03 +00:00

verboseChannelMention: don't use # for voice channels

This commit is contained in:
Dragory 2021-04-10 23:42:24 +03:00
parent e371c66fed
commit d7901da409

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;