Instant update profile when items cleared

This commit is contained in:
Lawin0129
2023-05-07 01:57:27 +01:00
parent 3da846abb5
commit e5bf95757b
@@ -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."});
}