From bc255cc553b4fb9628bb84a5801b30cd2d82a07f Mon Sep 17 00:00:00 2001 From: jaanbaaz Date: Tue, 24 Dec 2024 10:22:27 +0530 Subject: [PATCH] discord_username and name fix --- helpers/supabaseClient.py | 3 ++- main.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/supabaseClient.py b/helpers/supabaseClient.py index fea1cda..f1e5925 100644 --- a/helpers/supabaseClient.py +++ b/helpers/supabaseClient.py @@ -407,7 +407,8 @@ async def updateContributor(self, contributor: Member, table_class=None): # Prepare data for upsert update_data = { "discord_id": contributor["discord_id"], - "discord_username": contributor["name"], + "discord_username": contributor["discord_username"], + "field_name": contributor["name"], "chapter": chapters[0] if chapters else None, "gender": gender, "email": contributor["email"] if contributor["email"] else "", diff --git a/main.py b/main.py index 263a3f6..ee857b4 100644 --- a/main.py +++ b/main.py @@ -63,6 +63,7 @@ async def on_submit(self, interaction: discord.Interaction): "roles": user.roles, "joined_at": user.joined_at, "is_active": True, + "discord_username": user.display_name, "email":"" } except Exception as e: