refactor and add last_messages

This commit is contained in:
2025-08-21 00:21:31 -07:00
parent d6a770e011
commit 005e9ac80b

2
bot.py
View File

@@ -151,7 +151,7 @@ async def on_message(message):
async with channel.typing():
response = await conversation.send(user_message, media)
# Split into chunks for discord to prevent message too long
return [response[i:i+2000] for i in range(0, len(response), 2000)]
chunks = [response[i:i+2000] for i in range(0, len(response), 2000)]
conversation.last_messages = []
for chunk in chunks:
if channel.guild: