Add script to sync errors with Telegram's JSON

This commit is contained in:
Lonami Exo
2023-01-11 19:53:20 +01:00
parent 6332690a51
commit 7a74dedc48
3 changed files with 63 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ class Error:
# Should these be split into different files or doesn't really matter?
# Telegram isn't exactly consistent with returned errors anyway.
self.int_code = codes[0]
self.int_codes = codes
self.str_code = name
self.subclass = _get_class_name(codes[0])
self.subclass_exists = abs(codes[0]) in KNOWN_BASE_CLASSES