fix: display voice channel as link in messages (#658)

* fix: display voice channel as link in messages

* chore: format
pull/1049/head
Leda 2022-06-14 14:17:00 +00:00 committed by GitHub
parent a3729fcbdb
commit d1fe273310
1 changed files with 4 additions and 1 deletions

View File

@ -168,7 +168,10 @@ export default function Renderer({ content, disallowBigEmoji }: MarkdownProps) {
const id = args[0] as string,
channel = client.channels.get(id);
if (channel?.channel_type === "TextChannel") {
if (
channel?.channel_type === "TextChannel" ||
channel?.channel_type === "VoiceChannel"
) {
return `[#${channel.name}](/server/${channel.server_id}/channel/${id})`;
}