Skip to content

Commit

Permalink
try sort
Browse files Browse the repository at this point in the history
  • Loading branch information
LarmuseauNiels committed Apr 19, 2023
1 parent c389452 commit 94d21d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions interactions/contextmenus/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ module.exports = {
group by DATE_FORMAT(date(TimeStamp), '%Y-%m-%d' )
order by date desc
limit 10`;
lastOnline.sort((a, b) => b.date - a.date);
lastOnline.sort((a, b) => a.date - b.date);
let labels = lastOnline.map((x) => x.date).join(",");
let data = lastOnline.map((x) => x.hours).join(",");
let chart = `https://quickchart.io/chart/render/zm-83eae2c8-25d3-4d1f-899c-5bcc188ffb3e?labels=${labels}&data1=${data}`;
let chart = `https://quickchart.io/chart/render/zm-45881e0a-49bc-4498-8b62-d64ff3adb44a?labels=${labels}&data1=${data}`;
console.log(chart);

interaction.guild.members.fetch(interaction.targetId).then((member) => {
Expand Down Expand Up @@ -71,7 +71,6 @@ module.exports = {
.setImage(chart)
.setTimestamp();
interaction.editReply({
content: chart,
embeds: [embed],
ephemeral: true,
});
Expand Down

0 comments on commit 94d21d6

Please sign in to comment.