update
This commit is contained in:
parent
cbf244ca45
commit
ef8a66052d
3
.idea/markdown-navigator/profiles_settings.xml
Normal file
3
.idea/markdown-navigator/profiles_settings.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<component name="MarkdownNavigator.ProfileManager">
|
||||
<settings default="" pdf-export="" plain-text-search-scope="Project Files" />
|
||||
</component>
|
7
main.py
7
main.py
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import logging
|
||||
import random
|
||||
import traceback
|
||||
from html import escape
|
||||
from queue import Queue, Empty
|
||||
@ -143,8 +144,12 @@ def _sign_text(text, m: Message, limit):
|
||||
sign = ''
|
||||
if text.startswith('!sign') or text.startswith('/sign'):
|
||||
text = text[5:]
|
||||
# sign = f'\n\n____________\n' \
|
||||
# f'by <a href="tg://user?id={m.from_user.id}">{escape(m.from_user.full_name)}</a>'
|
||||
subs = conn.root.subscribers
|
||||
random_user = subs[random.choice(subs.keys())]
|
||||
sign = f'\n\n____________\n' \
|
||||
f'by <a href="tg://user?id={m.from_user.id}">{escape(m.from_user.full_name)}</a>'
|
||||
f'by <a href="https://telegra.ph/C-pervym-aprelya-04-01">{escape(random_user.name)}</a>'
|
||||
|
||||
return text[:limit - len(sign)] + sign
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user