From 200a4e47b8260f1bc2491c3d04e4044c8e4d1a26 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 25 Jul 2018 02:21:44 +0200 Subject: [PATCH] Clarify some strings --- telethon/extensions/tcpclient.py | 1 + telethon_generator/data/error_descriptions | 1 + telethon_generator/data/html/core.html | 2 +- telethon_generator/generators/docs.py | 8 +++++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/telethon/extensions/tcpclient.py b/telethon/extensions/tcpclient.py index 716c4066..f24dec40 100644 --- a/telethon/extensions/tcpclient.py +++ b/telethon/extensions/tcpclient.py @@ -67,6 +67,7 @@ class TcpClient: if proxy is None: s = socket.socket(mode, socket.SOCK_STREAM) else: + __log__.info('Connection will be made through proxy %s', proxy) import socks s = socks.socksocket(mode, socket.SOCK_STREAM) if isinstance(proxy, dict): diff --git a/telethon_generator/data/error_descriptions b/telethon_generator/data/error_descriptions index 20c35c1b..0558e800 100644 --- a/telethon_generator/data/error_descriptions +++ b/telethon_generator/data/error_descriptions @@ -67,3 +67,4 @@ FLOOD_TEST_PHONE_WAIT_X=A wait of {} seconds is required in the test servers TAKEOUT_INIT_DELAY_X=A wait of {} seconds is required before being able to initiate the takeout CHAT_NOT_MODIFIED=The chat or channel wasn't modified (title, invites, username, admins, etc. are the same) URL_INVALID=The URL used was invalid (e.g. when answering a callback with an URL that's not t.me/yourbot or your game's URL) +USER_NOT_PARTICIPANT=The target user is not a member of the specified megagroup or channel diff --git a/telethon_generator/data/html/core.html b/telethon_generator/data/html/core.html index aed00864..b55bb7de 100644 --- a/telethon_generator/data/html/core.html +++ b/telethon_generator/data/html/core.html @@ -149,7 +149,7 @@ users.getUsers#0d91a548 id:Vector<InputUser> = Vector<User>
  • Bool: Either True or False.
  • -
  • true: +
  • flag: These arguments aren't actually sent but rather encoded as flags. Any truthy value (True, 7) will enable this flag, although it's recommended to use True or diff --git a/telethon_generator/generators/docs.py b/telethon_generator/generators/docs.py index 98d10b73..ecfdee66 100755 --- a/telethon_generator/generators/docs.py +++ b/telethon_generator/generators/docs.py @@ -188,7 +188,8 @@ def _get_description(arg): desc.append('If left unspecified, it will be inferred automatically.') otherwise = True elif arg.is_flag: - desc.append('This argument can be omitted.') + desc.append('This argument defaults to ' + 'None and can be omitted.') otherwise = True if arg.type in {'InputPeer', 'InputUser', 'InputChannel'}: @@ -370,11 +371,12 @@ def _write_html_pages(tlobjects, errors, layer, input_res, output_dir): bold=True) # Type row + friendly_type = 'flag' if arg.type == 'true' else arg.type if arg.is_generic: - docs.add_row('!' + arg.type, align='center') + docs.add_row('!' + friendly_type, align='center') else: docs.add_row( - arg.type, align='center', link= + friendly_type, align='center', link= path_for_type(arg.type, relative_to=filename) )