Skip to content

Commit

Permalink
refactor: Style amount; Defer reply for the future
Browse files Browse the repository at this point in the history
  • Loading branch information
fearandesire committed Jun 2, 2024
1 parent 3f3a4d8 commit 5625857
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/betting/doubledown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class UserCommand extends Command {
public override async chatInputRun(
interaction: Command.ChatInputCommandInteraction,
) {
await interaction.deferReply()
// Ensure user is Patreon member
const isMember = await PatreonFacade.memberDetails(interaction.user.id)
if (!isMember) {
Expand Down Expand Up @@ -61,11 +62,11 @@ export class UserCommand extends Command {
const formattedBalance = MoneyFormatter.toUSD(newBalance)
const modifiedBetEmbed = new EmbedBuilder()
.setDescription(
`## Double Down\n\n**Bet:** ${formattedAmount} | **Payout:** ${formattedPayout}\n**Profit:** ${formattedProfit}\n**Balance:** ${formattedBalance}`,
`## Double Down\n\n**Bet:** \`${formattedAmount}\` | **Payout:** \`${formattedPayout}\`\n**Profit:** \`${formattedProfit}\`\n**Balance:** \`${formattedBalance}\``,
)
.setColor(embedColors.success)
.setThumbnail(interaction.user.displayAvatarURL())
return interaction.reply({ embeds: [modifiedBetEmbed] })
return interaction.editReply({ embeds: [modifiedBetEmbed] })
} catch (err) {
await new ApiErrorHandler().handle(
interaction,
Expand Down

0 comments on commit 5625857

Please sign in to comment.