History: Add currency and XP tracking

This commit is contained in:
2022-09-21 17:16:10 +02:00
parent dcd05322ca
commit a49a478972
5 changed files with 79 additions and 4 deletions

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

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"],