Now account name is copyable

This commit is contained in:
StNicolay 2023-01-03 12:12:40 +03:00
parent f9d163361a
commit fdbed91512
2 changed files with 2 additions and 10 deletions

View File

@ -86,10 +86,3 @@ async def send_deleteable_message(
parse_mode="MarkdownV2",
reply_markup=markup,
)
def escape(text: str) -> str:
escaped_chars = "*_~|`[("
for char in escaped_chars:
text = text.replace(char, rf"\\{char}")
return text

View File

@ -20,7 +20,6 @@ from . import markups
from .helper_functions import (
base_handler,
delete_message,
escape,
get_state,
register_state,
send_deleteable_message,
@ -394,9 +393,9 @@ async def _get_account3(
await send_deleteable_message(
bot,
mes.chat.id,
f"Название:\n{escape(account.name)}\n"
f"Название:\n`{account.name}`\n"
f"Логин:\n`{account.login}`\nПароль:\n`{account.password}`\nНажмите "
"на логин или пароль, чтобы скопировать",
"на название, логин или пароль, чтобы скопировать",
)
del text, mes