Code cleanup involving enums and message replies
This commit is contained in:
@@ -446,6 +446,11 @@ class ExpireBehaviour(Enum):
|
||||
|
||||
ExpireBehavior = ExpireBehaviour
|
||||
|
||||
class StickerType(Enum):
|
||||
png = 1
|
||||
apng = 2
|
||||
lottie = 3
|
||||
|
||||
def try_enum(cls, val):
|
||||
"""A function that tries to turn the value into enum ``cls``.
|
||||
|
||||
@@ -456,8 +461,3 @@ def try_enum(cls, val):
|
||||
return cls._enum_value_map_[val]
|
||||
except (KeyError, TypeError, AttributeError):
|
||||
return val
|
||||
|
||||
class StickerType(Enum):
|
||||
png = 1
|
||||
apng = 2
|
||||
lottie = 3
|
||||
|
||||
Reference in New Issue
Block a user