From 7b6e816ff124af88c34d09475d292d970d54ccec Mon Sep 17 00:00:00 2001 From: gsd Date: Tue, 18 Jun 2024 23:42:37 +0300 Subject: [PATCH] buyvip fix --- user_ext/buyvip.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/user_ext/buyvip.py b/user_ext/buyvip.py index 8606cd6..9cf14a4 100644 --- a/user_ext/buyvip.py +++ b/user_ext/buyvip.py @@ -28,6 +28,10 @@ class Extension: view = discord.ui.View() for price in prices: for m_value in price.get("items", []): - view.add_item(discord.ui.Button(label=f"{price['name']} - {m_value['name']}", url=f"{os.getenv('BACKEND_URL')}{m_value['url']}")) + url = m_value['url'] + if "STEAM" in m_value['name']: + url = url.split("&cost")[0] + + view.add_item(discord.ui.Button(label=f"{price['name']} - {m_value['name']}", url=f"{os.getenv('BACKEND_URL')}{url}")) return await interaction.followup.send(content=content, view=view, ephemeral=False) \ No newline at end of file