upload from local

upload muzovkantv2 from local storage
This commit is contained in:
2026-03-08 14:35:33 +05:00
committed by GitHub
parent 86361adabe
commit 5f00de56b9
29 changed files with 1089 additions and 0 deletions

19
utils/data_manager.py Normal file
View File

@@ -0,0 +1,19 @@
import json
import os
MESSAGE_ID_FILE = 'data/message_id.json' #ts for roles
def save_message_id(message_id):
os.makedirs('data', exist_ok=True)
with open(MESSAGE_ID_FILE, 'w') as f:
json.dump({'message_id': message_id}, f)
def load_message_id():
try:
with open(MESSAGE_ID_FILE, 'r') as f:
data = json.load(f)
return data.get('message_id')
except FileNotFoundError:
return None
except json.JSONDecodeError:
return None