encoding fix

This commit is contained in:
thedragonsinn
2024-02-12 16:52:14 +05:30
parent e16bb7688a
commit 578017f2ee

View File

@@ -132,7 +132,7 @@ def generate_filter(message: Message):
async def export_history(chat, message: Message):
doc = BytesIO(pickle.dumps(chat.history))
doc = BytesIO(pickle.dumps(chat.history), encoding="utf-8")
doc.name = "AI_Chat_History.txt"
await bot.send_document(
chat_id=message.from_user.id, document=doc, caption=message.text