mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Optional
This commit is contained in:
parent
b30e4e77ad
commit
ce7b5f70e0
2 changed files with 4 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ class BaseHandlerMixin:
|
|||
"""
|
||||
Typed mixin. Do nothing.
|
||||
"""
|
||||
|
||||
event: TelegramObject
|
||||
data: Dict[str, Any]
|
||||
|
||||
|
|
@ -17,6 +18,7 @@ class _HandlerBotMixin(BaseHandlerMixin):
|
|||
"""
|
||||
Mixin adds bot attribute
|
||||
"""
|
||||
|
||||
@property
|
||||
def bot(self) -> Bot:
|
||||
if "bot" in self.data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue