Add the amount of currency a user has to the drop command (#288)
- Updated the card embed generator to use fields instead of just dumping everything in the description - Add the currency a user has to the embed as a field #253 Reviewed-on: #288 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
parent
5c317be4d5
commit
b06fe11871
4 changed files with 33 additions and 17 deletions
|
@ -76,7 +76,7 @@ export default class Claim extends ButtonEvent {
|
|||
|
||||
const imageFileName = card.card.path.split("/").pop()!;
|
||||
|
||||
const embed = CardDropHelperMetadata.GenerateDropEmbed(card, inventory.Quantity, imageFileName, interaction.user.username);
|
||||
const embed = CardDropHelperMetadata.GenerateDropEmbed(card, inventory.Quantity, imageFileName, interaction.user.username, user.Currency);
|
||||
const row = CardDropHelperMetadata.GenerateDropButtons(card, claimId, interaction.user.id, true);
|
||||
|
||||
await interaction.editReply({
|
||||
|
@ -84,4 +84,4 @@ export default class Claim extends ButtonEvent {
|
|||
components: [ row ],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ export default class Reroll extends ButtonEvent {
|
|||
const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id);
|
||||
const quantityClaimed = inventory ? inventory.Quantity : 0;
|
||||
|
||||
const embed = CardDropHelperMetadata.GenerateDropEmbed(randomCard, quantityClaimed, imageFileName);
|
||||
const embed = CardDropHelperMetadata.GenerateDropEmbed(randomCard, quantityClaimed, imageFileName, undefined, user.Currency);
|
||||
|
||||
const claimId = v4();
|
||||
|
||||
|
@ -78,4 +78,4 @@ export default class Reroll extends ButtonEvent {
|
|||
await interaction.editReply(`Unable to send next drop. Please try again, and report this if it keeps happening. (${randomCard.card.id})`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue