mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +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
|
UPLOAD_VIDEO_NOTE = types.SendMessageUploadRoundAction
|
||||||
"""User is uploading a round video note."""
|
"""User is uploading a round video note."""
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
def from_string(cls, action: str) -> "ChatAction":
|
def from_string(action: str) -> "ChatAction":
|
||||||
for a in iter(ChatAction):
|
for a in iter(ChatAction):
|
||||||
if a.name.lower() == action.lower():
|
if a.name.lower() == action.lower():
|
||||||
return a
|
return a
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue