mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 22:14:50 +00:00
Make ChatAction.from_string() static
This commit is contained in:
parent
a32e496fe3
commit
47d5889612
1 changed files with 2 additions and 2 deletions
|
|
@ -66,8 +66,8 @@ class ChatAction(Enum):
|
|||
UPLOAD_VIDEO_NOTE = types.SendMessageUploadRoundAction
|
||||
"""User is uploading a round video note."""
|
||||
|
||||
@classmethod
|
||||
def from_string(cls, action: str) -> "ChatAction":
|
||||
@staticmethod
|
||||
def from_string(action: str) -> "ChatAction":
|
||||
for a in iter(ChatAction):
|
||||
if a.name.lower() == action.lower():
|
||||
return a
|
||||
|
|
|
|||
Loading…
Reference in a new issue