Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
illvart committed Feb 1, 2024
1 parent 88e5acf commit 8a104be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions getter/core/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(
):
self._dialogs = []
self._plugins = {}
self.log = LOG
kwargs["api_id"] = api_id
kwargs["api_hash"] = api_hash
kwargs["request_retries"] = 3
Expand Down
2 changes: 1 addition & 1 deletion getter/core/patched/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# Please read the GNU Affero General Public License in
# < https://github.com/kastaid/getter/blob/main/LICENSE/ >.

from .client import Client
from .client import TelegramClient
from .conversation import Conversation
from .message import Message
8 changes: 1 addition & 7 deletions getter/core/patched/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Please read the GNU Affero General Public License in
# < https://github.com/kastaid/getter/blob/main/LICENSE/ >.

import logging
import typing
from asyncio import sleep
from random import randrange
Expand All @@ -15,17 +14,12 @@
from getter.core.constants import MAX_MESSAGE_LEN
from getter.core.functions import get_chat_id, get_text, get_user
from getter.core.patcher import patch, patchable
from getter.logger import LOG

delattr(fun.account, "DeleteAccountRequest")


@patch(telethon.client.telegramclient.TelegramClient)
class Client(telethon.client.telegramclient.TelegramClient):
@patchable(True)
def log(self) -> logging:
return LOG

class TelegramClient:
@patchable()
async def get_id(self, entity: hints.EntityLike) -> int:
try:
Expand Down

0 comments on commit 8a104be

Please sign in to comment.