History: Add currency and XP tracking

This commit is contained in:
Minz committed 2022-09-21 17:18:12 +02:00
1 parent dcd05322ca
commit a49a478972
5 files changed
+79 -4

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ module.exports = {
});
break;
case "add_xp":
await extUser.addExperience(interaction.options.getString("value"))
await extUser.addExperience(interaction.options.getString("value"), `Debug command ran by ${interaction.member.displayName}`);
interaction.editReply({
content: `Added ${interaction.options.getString("value")} XP to <@${extUser.discordId}>`,
ephemeral: false
+2 -2
View File
@@ -86,7 +86,7 @@ module.exports = {
);
}
//add 10 experience to the user
await user.addExperience(10);
await user.addExperience(10, 'drop');
const file = new AttachmentBuilder(deckImage);
@@ -147,7 +147,7 @@ module.exports = {
dropData: JSON.stringify(historyEntry),
type: 1
});
await claimUser.addExperience(5);
await claimUser.addExperience(5, "claim");
//fetch character name from database given the character id
let character = await Character.findOne({
attributes: ["name"],