Skip to content

Commit

Permalink
Fixed weekly report sending error
Browse files Browse the repository at this point in the history
  • Loading branch information
seanjhardy committed Nov 27, 2022
1 parent 2fb91b7 commit 74409c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/weeklyReviewRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const {getDaysBetweenDates} = require("./dateHelper");
* @param tasks - tasks to display
*/

exports.displayReview = async (user, interaction, tasks) => {
exports.displayReview = async (user, channel, tasks) => {
const reviewImage = new MessageAttachment(await getWeeklyReview(user, tasks), `${user.name}_review.png`);

return interaction.editReply({content: `<@${user.discordid}> your weekly report has been published`, files: [reviewImage]});
return channel.send({content: `<@${user.discordid}> your weekly report has been published`, files: [reviewImage]});
};

/**
Expand Down
2 changes: 1 addition & 1 deletion slash/skilltree/weekly.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports.run = async (client, interaction) => {
user.username = discorduser.username;
const tasks = await getRecentTasks(userID, 7);
//Display weekly analytics
displayReview(user, interaction, tasks);
displayReview(user, interaction.channel, tasks);
};

exports.conf = {
Expand Down

0 comments on commit 74409c4

Please sign in to comment.