mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: lost validate method
This commit is contained in:
parent
72b416c8bf
commit
828a30af21
1 changed files with 6 additions and 0 deletions
|
|
@ -293,6 +293,12 @@ class Text(Filter):
|
|||
self.startswith = startswith
|
||||
self.ignore_case = ignore_case
|
||||
|
||||
@classmethod
|
||||
def validate(cls, full_config: Dict[str, Any]):
|
||||
for param, key in cls._default_params:
|
||||
if param in full_config:
|
||||
return {key: full_config.pop(param)}
|
||||
|
||||
async def check(self, obj: Union[Message, CallbackQuery, InlineQuery, Poll]):
|
||||
if isinstance(obj, Message):
|
||||
text = obj.text or obj.caption or ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue