diff --git a/discord_ui/scout_view.py b/discord_ui/scout_view.py index e225dd1..ffeff87 100644 --- a/discord_ui/scout_view.py +++ b/discord_ui/scout_view.py @@ -11,7 +11,7 @@ import logging import discord -from api_calls import db_get, db_patch, db_post +from api_calls import db_get, db_post from helpers.main import get_team_by_owner, get_card_embeds from helpers.scouting import ( SCOUT_TOKEN_COST, @@ -340,9 +340,7 @@ class BuyScoutTokenView(discord.ui.View): # Deduct currency new_wallet = team["wallet"] - SCOUT_TOKEN_COST try: - await db_patch( - "teams", object_id=team["id"], params=[("wallet", new_wallet)] - ) + await db_post(f'teams/{team["id"]}/money/-{SCOUT_TOKEN_COST}') except Exception as e: logger.error(f"Failed to deduct scout token cost: {e}") await interaction.response.edit_message(