Metadata-Version: 2.1
Name: newthon
Version: 1.26.2
Summary: An edited 1.24.0 version of the full-featured Telegram client library for Python 3
Home-page: https://github.com/LonamiWebs/Telethon
Author: Lonami Exo
Author-email: totufals@hotmail.com
License: MIT
Download-URL: https://github.com/LonamiWebs/Telethon/releases
Keywords: telegram api chat client library messaging mtproto
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Chat
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.5
License-File: LICENSE
Requires-Dist: pyaes
Requires-Dist: rsa
Provides-Extra: cryptg
Requires-Dist: cryptg ; extra == 'cryptg'

Forked Telethon |logo|
======================
.. |logo| image:: https://github.com/LonamiWebs/Telethon/raw/master/logo.svg
    :width: 60pt
    :height: 60pt

`↗️ Updated tl.telethon.dev <https://disk6969.github.io/Telethon>`_

.. code-block:: py

  Telethon 1.24.0 with Layer 140

====

.. code-block:: py

  pip install newthon


Reactions
=========

.. code-block:: py

    client.send_reaction(peer, message, "😢", big=False), or shorter:

.. code-block:: py

    message.react("😁", big=True)

to send a reaction with animation(for pms) use `big=True`, and, to remove a reaction use `remove=True`: 

.. code-block:: py

  message.react(remove=True)

Requests of join and events for ChatAction events
=================================================
* event.new_invite (only for bot accounts)

.. code-block:: py

    @bot.on(events.ChatAction(func=lambda e : e.new_join_request))
    async def _(event):
        event.approve_user(approved=True or False)


* event.new_approve for user accounts

.. code-block:: py

    @client.on(events.ChatAction(func=lambda e : e.new_approve))
    async def _(event):
        event.approve_user(approved=True/False)


using raw api to accept old requests
------------------------------------

- Getting them

.. code-block:: py

    result = client(functions.messages.GetChatInviteImportersRequest(
        peer="chat",
        offset_date=None, 
        offset_user=telethon.tl.types.InputUserEmpty(),
        limit=1000
    ))

- manual approve

.. code-block:: py

    for a in result:
        client(functions.messages.HideChatJoinRequestRequest(
            peer='chat or username',
            user_id='To-approve',
            approved=True or False
        ))


- batch approve: 

.. code-block:: py 

    client(functions.messages.HideAllChatJoinRequestsRequest(
        peer=entity, 
        approved=True or False
    ))

iter_participant
================
aggressive True will sleep by default.
its sleep value can be adjusted using the sleep parameter, this will make it sleep for that specified amount before processing next chunk.

.. code-block:: py 

    client.get_participant(chat, aggressive=True, sleep=2)


Content privacy
===============
``chat.noforwards`` will return True for chats with forward restriction enabled, same applies to bot messages with ``message.noforwards``

spoilers
========
You can use `||Text||` to create spoilers, or, for HTML `<tg-spoiler>Text</tg-spoiler>`

to create underline markdown, use `--Text--`

- also you can now get a single message using the link in get/iter_messages()

.. code-block:: py 

    client.get_messages("https://t.me/username/1")