def getLogger(name: str) -> logging.Logger: """ This will return new logger object. """ LOG.debug(LOG_STR.format(f"Creating Logger => {name}")) return logging.getLogger(name)
import os import asyncio from typing import List, Dict, Union, Optional, Sequence from pyrogram import InlineKeyboardMarkup from pyrogram.errors.exceptions import MessageAuthorRequired, MessageTooLong from pyrogram.errors.exceptions.bad_request_400 import MessageNotModified from userge.utils import logging, Config from .base import BaseClient, BaseMessage CANCEL_LIST: List[int] = [] ERROR_MSG_DELETE_TIMEOUT = 5 ERROR_STRING = "**ERROR**: `{}`" LOG = logging.getLogger(__name__) LOG_STR = "<<<! [[[[[ ___{}___ ]]]]] !>>>" class Message(BaseMessage): """ Modded Message Class For Userge """ def __init__(self, client: BaseClient, message: BaseMessage, **kwargs: Union[str, bool]) -> None: super().__init__(client=client, **self.__msg_to_dict(message))