change sign format

This commit is contained in:
bakatrouble 2019-04-05 02:52:14 +03:00
parent de15a932fa
commit 96f3b7b76f
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownExportedFiles">
<htmlFiles />
<imageFiles />
<otherFiles />
</component>
</project>

View File

@ -143,8 +143,7 @@ def _sign_text(text, m: Message, limit):
sign = '' sign = ''
if text.startswith('!sign') or text.startswith('/sign'): if text.startswith('!sign') or text.startswith('/sign'):
text = text[5:] text = text[5:]
sign = f'\n\n____________\n' \ sign = f'\n\n — <a href="tg://user?id={m.from_user.id}">{escape(m.from_user.full_name)}</a>'
f'by <a href="tg://user?id={m.from_user.id}">{escape(m.from_user.full_name)}</a>'
return text[:limit - len(sign)] + sign return text[:limit - len(sign)] + sign