mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Further clarify the documentation (flood wait, lists and inputs)
This commit is contained in:
parent
55bcc29ae0
commit
e9dd93f09c
|
@ -207,6 +207,13 @@ def get_description(arg):
|
||||||
desc.append('This argument can be omitted.')
|
desc.append('This argument can be omitted.')
|
||||||
otherwise = True
|
otherwise = True
|
||||||
|
|
||||||
|
if arg.type in {'InputPeer', 'InputUser', 'InputChannel'}:
|
||||||
|
desc.append(
|
||||||
|
'Anything entity-like will work if the library can find its '
|
||||||
|
'<code>Input</code> version (e.g., usernames, <code>Peer</code>, '
|
||||||
|
'<code>User</code> or <code>Channel</code> objects, etc.).'
|
||||||
|
)
|
||||||
|
|
||||||
if arg.is_vector:
|
if arg.is_vector:
|
||||||
if arg.is_generic:
|
if arg.is_generic:
|
||||||
desc.append('A list of other Requests must be supplied.')
|
desc.append('A list of other Requests must be supplied.')
|
||||||
|
@ -221,7 +228,11 @@ def get_description(arg):
|
||||||
desc.insert(1, 'Otherwise,')
|
desc.insert(1, 'Otherwise,')
|
||||||
desc[-1] = desc[-1][:1].lower() + desc[-1][1:]
|
desc[-1] = desc[-1][:1].lower() + desc[-1][1:]
|
||||||
|
|
||||||
return ' '.join(desc)
|
return ' '.join(desc).replace(
|
||||||
|
'list',
|
||||||
|
'<span class="tooltip" title="Any iterable that supports len() '
|
||||||
|
'will work too">list</span>'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def copy_replace(src, dst, replacements):
|
def copy_replace(src, dst, replacements):
|
||||||
|
|
|
@ -108,6 +108,10 @@ span.sh4 {
|
||||||
color: #06c;
|
color: #06c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.tooltip {
|
||||||
|
border-bottom: 1px dashed #444;
|
||||||
|
}
|
||||||
|
|
||||||
#searchBox {
|
#searchBox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
|
@ -95,6 +95,11 @@ is just a matter of taste, and how much control you need.
|
||||||
|
|
||||||
Remember that you can get yourself at any time with ``client.get_me()``.
|
Remember that you can get yourself at any time with ``client.get_me()``.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
Please note that if you fail to login around 5 times (or change the first
|
||||||
|
parameter of the ``TelegramClient``, which is the session name) you will
|
||||||
|
receive a ``FloodWaitError`` of around 22 hours, so be careful not to mess
|
||||||
|
this up! This shouldn't happen if you're doing things as explained, though.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
If you want to use a **proxy**, you have to `install PySocks`__
|
If you want to use a **proxy**, you have to `install PySocks`__
|
||||||
|
|
Loading…
Reference in New Issue
Block a user