From 39b4ae14def6374af0f4ddb1bde3023902db2f7f Mon Sep 17 00:00:00 2001 From: BennyThink Date: Sun, 6 Mar 2022 17:38:33 +0800 Subject: [PATCH] fix sub count --- ytdlbot/ytdl_bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ytdlbot/ytdl_bot.py b/ytdlbot/ytdl_bot.py index 4c9416f..07fd52f 100644 --- a/ytdlbot/ytdl_bot.py +++ b/ytdlbot/ytdl_bot.py @@ -177,7 +177,10 @@ def sub_count_handler(client: "Client", message: "types.Message"): username = message.from_user.username chat_id = message.chat.id if username == OWNER: - client.send_message(chat_id, VIP().sub_count()) + with BytesIO() as f: + f.write(VIP().sub_count().encode("u8")) + f.name = "subscription count.txt" + client.send_document(chat_id, f) @app.on_message(filters.command(["direct"]))