Added full support of Bot API 7.9

This commit is contained in:
JRoot Junior 2024-08-15 00:20:52 +03:00
parent 1c323ecc97
commit 7b14f59e29
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
45 changed files with 786 additions and 105 deletions

View file

@ -1,3 +1,4 @@
import json
import re
from pathlib import Path
@ -35,8 +36,11 @@ def get_package_version() -> str:
def get_telegram_api_version() -> str:
path = Path.cwd() / ".butcher" / "schema" / "schema.json"
schema = json.loads(path.read_text())
version = schema["api"]["version"]
path = Path.cwd() / ".apiversion"
version = path.read_text().strip()
path.write_text(version + "\n")
return version