mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Minor typography changes
This commit is contained in:
parent
82b35acf52
commit
9deb95a9ea
1 changed files with 8 additions and 3 deletions
|
|
@ -86,19 +86,24 @@ class MemoryStorage(BaseStorage):
|
||||||
def has_bucket(self):
|
def has_bucket(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
async def get_bucket(self, *, chat: typing.Union[str, int, None] = None, user: typing.Union[str, int, None] = None,
|
async def get_bucket(self, *,
|
||||||
|
chat: typing.Union[str, int, None] = None,
|
||||||
|
user: typing.Union[str, int, None] = None,
|
||||||
default: typing.Optional[dict] = None) -> typing.Dict:
|
default: typing.Optional[dict] = None) -> typing.Dict:
|
||||||
chat, user = self.check_address(chat=chat, user=user)
|
chat, user = self.check_address(chat=chat, user=user)
|
||||||
user = self._get_user(chat, user)
|
user = self._get_user(chat, user)
|
||||||
return user['bucket']
|
return user['bucket']
|
||||||
|
|
||||||
async def set_bucket(self, *, chat: typing.Union[str, int, None] = None, user: typing.Union[str, int, None] = None,
|
async def set_bucket(self, *,
|
||||||
|
chat: typing.Union[str, int, None] = None,
|
||||||
|
user: typing.Union[str, int, None] = None,
|
||||||
bucket: typing.Dict = None):
|
bucket: typing.Dict = None):
|
||||||
chat, user = self.check_address(chat=chat, user=user)
|
chat, user = self.check_address(chat=chat, user=user)
|
||||||
user = self._get_user(chat, user)
|
user = self._get_user(chat, user)
|
||||||
user['bucket'] = bucket
|
user['bucket'] = bucket
|
||||||
|
|
||||||
async def update_bucket(self, *, chat: typing.Union[str, int, None] = None,
|
async def update_bucket(self, *,
|
||||||
|
chat: typing.Union[str, int, None] = None,
|
||||||
user: typing.Union[str, int, None] = None,
|
user: typing.Union[str, int, None] = None,
|
||||||
bucket: typing.Dict = None, **kwargs):
|
bucket: typing.Dict = None, **kwargs):
|
||||||
chat, user = self.check_address(chat=chat, user=user)
|
chat, user = self.check_address(chat=chat, user=user)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue