This commit is contained in:
djimbo
2022-09-24 20:38:34 +03:00
parent 359b9717ec
commit 9213a80cb9
16 changed files with 77 additions and 49 deletions
+17
View File
@@ -70,6 +70,23 @@ async def smart_send(bot: Bot, message: types.Message, user_id, text_add=None, r
######################################## ПРОЧЕЕ ########################################
# Удаление отступов у текста
def ded(get_text: str):
if get_text is not None:
split_text = get_text.split("\n")
if split_text[0] == "": split_text.pop(0)
if split_text[-1] == "": split_text.pop(-1)
save_text = []
for text in split_text:
while text.startswith(" "):
text = text[1:]
save_text.append(text)
get_text = "\n".join(save_text)
return get_text
# Очистка HTML тэгов
def clear_html(get_text: str):
if get_text is not None: