mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Set parent object
This commit is contained in:
parent
1c81842167
commit
e2dca9da0d
2 changed files with 14 additions and 1 deletions
|
|
@ -35,8 +35,9 @@ class AIOGramBot:
|
|||
if self.session and not self.session.closed:
|
||||
self.session.close()
|
||||
|
||||
def prepare_object(self, obj):
|
||||
def prepare_object(self, obj, parent=None):
|
||||
obj.bot = self
|
||||
obj.parent = parent
|
||||
return obj
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue