From f892594af3c7bd6fb5f6e8acb0b5b12b67ae05a1 Mon Sep 17 00:00:00 2001 From: LobaDK Date: Thu, 16 May 2024 23:34:21 +0200 Subject: [PATCH] Fix add_chat trying to get the server ID of a DM (Channel ID will be used instead) --- cogs/Chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/Chat.py b/cogs/Chat.py index b01b18e..878888b 100644 --- a/cogs/Chat.py +++ b/cogs/Chat.py @@ -251,7 +251,7 @@ async def initiateChat( database.AsyncSessionLocal, schemas.Chat.Add( user_id=ctx.author.id, - server_id=ctx.guild.id, + server_id=ctx.guild.id or ctx.channel.id, user_message=user_message, assistant_message=chat_response, shared_chat=shared_chat,