Skip to content

Commit

Permalink
updated sort
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehs committed Apr 19, 2024
1 parent 5b4518b commit c26bf09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/gonokami.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ bot.command("number", async (ctx) => {
ctx.telegram.sendChatAction(ctx.chat.id, "typing");
let res = await fetch(
"https://dxc.tagfans.com/mighty?_field%5B%5D=*&%24gid=10265&%24description=anouncingNumbers"
).then((x) => x.json());
)
.then((x) => x.json())
.then((x) => x.sort((a, b) => b.UpdDate - a.UpdDate));
let currentNumber = JSON.parse(res[0].detail_json).selections["目前號碼"];
let responseText = `目前五之神號碼為 *${currentNumber}*`;
ctx.reply(responseText, {
Expand Down

0 comments on commit c26bf09

Please sign in to comment.