go back to sync sqlite; async sqlite leaves hanging processes

This commit is contained in:
2025-08-22 00:51:09 -07:00
parent ad9c069993
commit fd08420f26
3 changed files with 36 additions and 53 deletions

4
bot.py
View File

@@ -28,7 +28,7 @@ class AoiBot(commands.Bot):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def setup_hook(self):
self.db = await Database.get()
self.db = Database.get()
intents = discord.Intents.default()
intents.messages = True
intents.message_content = True
@@ -169,7 +169,7 @@ async def newchat(interaction: discord.Interaction, prompt: str = None):
name="changeprompt",
description="Change the current chat's system prompt."
)
async def newchat(interaction: discord.Interaction, prompt: str):
async def changeprompt(interaction: discord.Interaction, prompt: str):
await interaction.response.defer()
channel_id = interaction.channel_id
conversation = await Conversation.get(channel_id, args.base_url, bot.db)