Document AUTH_KEY_DUPLICATED, better assistant UX

This commit is contained in:
Lonami Exo 2018-10-19 19:32:17 +02:00
parent 39929db2b8
commit f51b56558d
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import time
import urllib.parse import urllib.parse
from telethon import TelegramClient, events, custom from telethon import TelegramClient, events, custom
from telethon.extensions import markdown
logging.basicConfig(level=logging.WARNING) logging.basicConfig(level=logging.WARNING)
logging.getLogger('asyncio').setLevel(logging.ERROR) logging.getLogger('asyncio').setLevel(logging.ERROR)
@ -325,7 +326,8 @@ async def handler(event):
m = re.match('(client|msg).(.+)', query) m = re.match('(client|msg).(.+)', query)
if m: if m:
text = get_docs_message(m.group(1), m.group(2)) text = get_docs_message(m.group(1), m.group(2))
result = builder.article(text, text=text) query = markdown.parse(text)[0]
result = builder.article(query, text=text)
else: else:
m = re.match('ref.(.+)', query) m = re.match('ref.(.+)', query)
if m: if m:

View File

@ -73,3 +73,4 @@ REPLY_MARKUP_TOO_LONG=The data embedded in the reply markup buttons was too much
SHORTNAME_OCCUPY_FAILED=An error occurred when trying to register the short-name used for the sticker pack. Try a different name SHORTNAME_OCCUPY_FAILED=An error occurred when trying to register the short-name used for the sticker pack. Try a different name
PACK_SHORT_NAME_INVALID=Invalid sticker pack name. It must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". PACK_SHORT_NAME_INVALID=Invalid sticker pack name. It must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>".
PHOTO_SAVE_FILE_INVALID=The photo you tried to send cannot be saved by Telegram. A reason may be that it exceeds 10MB. Try resizing it locally PHOTO_SAVE_FILE_INVALID=The photo you tried to send cannot be saved by Telegram. A reason may be that it exceeds 10MB. Try resizing it locally
AUTH_KEY_DUPLICATED=The authorization key (session file) was used under two different IP addresses simultaneously, and can no longer be used. Use the same session exclusively, or use different sessions