dublib 0.6.1__tar.gz → 0.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dublib-0.6.1/src/dublib.egg-info → dublib-0.6.2}/PKG-INFO +1 -1
- {dublib-0.6.1 → dublib-0.6.2}/pyproject.toml +1 -1
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/TelebotUtils.py +4 -3
- {dublib-0.6.1 → dublib-0.6.2/src/dublib.egg-info}/PKG-INFO +1 -1
- {dublib-0.6.1 → dublib-0.6.2}/LICENSE +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/README.md +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/setup.cfg +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Exceptions/StyledPrinter.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Exceptions/TelebotUtils.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Exceptions/Terminalyzer.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Exceptions/WebRequestor.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Exceptions/__init__.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Methods.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Polyglot.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/StyledPrinter.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/Terminalyzer.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/WebRequestor.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib/__init__.py +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib.egg-info/SOURCES.txt +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib.egg-info/dependency_links.txt +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib.egg-info/requires.txt +0 -0
- {dublib-0.6.1 → dublib-0.6.2}/src/dublib.egg-info/top_level.txt +0 -0
|
@@ -129,15 +129,16 @@ class UserData:
|
|
|
129
129
|
# Сохранение данных.
|
|
130
130
|
self.__SaveData()
|
|
131
131
|
|
|
132
|
-
def create_property(self, key: str, value: any):
|
|
132
|
+
def create_property(self, key: str, value: any, force: bool = True):
|
|
133
133
|
"""
|
|
134
134
|
Создаёт свойство пользователя и задаёт ему значение, если такового ещё не существует.
|
|
135
135
|
key – ключ свойства;
|
|
136
|
-
value –
|
|
136
|
+
value – значение;
|
|
137
|
+
force – указывает, необходимо ли перезаписывать значение уже существующего ключа.
|
|
137
138
|
"""
|
|
138
139
|
|
|
139
140
|
# Если свойства не существует.
|
|
140
|
-
if key not in self.__Data["data"].keys():
|
|
141
|
+
if key not in self.__Data["data"].keys() or force:
|
|
141
142
|
# Создание свойства.
|
|
142
143
|
self.__Data["data"][key] = value
|
|
143
144
|
# Сохранение данных.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|