From e5bf95757bfd0cf90c0331983ad641b1418d87d1 Mon Sep 17 00:00:00 2001 From: Lawin0129 <56766256+Lawin0129@users.noreply.github.com> Date: Sun, 7 May 2023 01:57:27 +0100 Subject: [PATCH] Instant update profile when items cleared --- DiscordBot/commands/clear-items-for-shop.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DiscordBot/commands/clear-items-for-shop.js b/DiscordBot/commands/clear-items-for-shop.js index ef905fa..00279f4 100644 --- a/DiscordBot/commands/clear-items-for-shop.js +++ b/DiscordBot/commands/clear-items-for-shop.js @@ -1,5 +1,6 @@ const User = require("../../model/user.js"); const Profile = require("../../model/profiles.js"); +const functions = require("../../structs/functions.js"); const fs = require("fs"); module.exports = { @@ -47,6 +48,12 @@ module.exports = { await profiles.updateOne({ $set: { [`profiles.athena`]: athena } }); + functions.sendXmppMessageToId({ + type: "com.epicgames.gift.received", + payload: {}, + timestamp: new Date().toISOString() + }, targetUser.accountId); + return interaction.editReply({ content: "Successfully cleared items in your profile that are from the item shop."}); }