Skip to content

Commit

Permalink
chart test
Browse files Browse the repository at this point in the history
  • Loading branch information
LarmuseauNiels committed Apr 19, 2023
1 parent 1f3a9e9 commit 0be4ced
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions interactions/contextmenus/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module.exports = {
limit 10`;
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?title=Last 10 days online&labels=${labels}&data1=${data}`;
console.log(chart);

interaction.guild.members.fetch(interaction.targetId).then((member) => {
let embed = new EmbedBuilder()
Expand Down Expand Up @@ -65,11 +67,12 @@ module.exports = {
inline: false,
}
)
.setImage(
`https://quickchart.io/chart/render/zm-ac7d2566-6186-4be1-b415-bc30470a6d6b?title=Last 10 days online&labels=${labels}&data1=${data}`
)
.setTimestamp();
interaction.editReply({ embeds: [embed], ephemeral: true });
interaction.editReply({
content: chart,
embeds: [embed],
ephemeral: true,
});
});
},
isGuild: true,
Expand Down

0 comments on commit 0be4ced

Please sign in to comment.