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

@@ -9,6 +9,15 @@ class Usability(enum.Enum):
BOT = 2
BOTH = 4
@property
def key(self):
return {
Usability.UNKNOWN: 'unknown',
Usability.USER: 'user',
Usability.BOT: 'bot',
Usability.BOTH: 'both',
}[self]
class MethodInfo:
def __init__(self, name, usability, errors, friendly):