Skip to content

Commit

Permalink
refactor to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Jun 16, 2024
1 parent e617ed6 commit 4a16622
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/stepstep.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ bot.command("stepstep", async ({ reply, message }) => {
).then((res) => res.json());
rank = rank.slice(0, 5);

let responseText = `<b>🍪 餅餅踏踏排行榜 🍪</b>\n`;
let responseText = `**🍪 餅餅踏踏排行榜 🍪**\n`;
responseText += `${dateStr}\n\n`;
rank.forEach((item, index) => {
let distance = item.distance.toFixed(2);
let steps = item.steps.toLocaleString();
responseText += `<code>${index + 1}. </code>${item.user.name}\n`;
responseText += `<code> ${distance} 公里 - ${steps}</code>\n`;
responseText += `\`${index + 1}. \`${item.user.name}\n`;
responseText += `\` ${distance} 公里 - ${steps}\`\n`;
});

reply(responseText, {
reply_to_message_id: message.message_id,
parse_mode: "html",
parse_mode: "markdown",
});
});

Expand Down

0 comments on commit 4a16622

Please sign in to comment.