feat: updated description format

This commit is contained in:
SethCohen
2022-08-23 23:30:39 -04:00
parent 79005b23fe
commit a1d7a74af9
+14 -1
View File
@@ -27,11 +27,24 @@ async function run () {
const content = await getContext()
let description = '';
for (const line of content.body) {
if (line.startsWith('## ')) {
description += `**${line.slice(3)}**\n`;
}
else if (line.startsWith('### ')) {
description += `**__${line.slice(4)}__**\n`;
}
else if (line.startsWith('* ')) {
description += `- ${line.slice(2)}\n`;
}
}
const embedMsg = {
title: `Release ${content.version}`,
url: content.html_url,
color: colour,
description: content.body,
description: description,
}
const body = { username: username, avatar_url: avatarUrl, embeds: [embedMsg], }