Skip to content

Commit

Permalink
Update type_.py
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d authored Aug 13, 2024
1 parent 3ec9fe1 commit faff6ab
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tgram/types/type_.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@

logger = logging.getLogger(__name__)

BOUNDED_TYPES = Union[
"tgram.types.User",
"tgram.types.CallbackQuery",
"tgram.types.Message",
"tgram.types.Chat",
"tgram.types.ChatFullInfo",
"tgram.types.InlineQuery",
]


class Type_:
def __init__(self, me: "tgram.TgBot" = None, json: dict = None) -> None:
BOUNDED_TYPES = (
tgram.types.User,
tgram.types.CallbackQuery,
tgram.types.Message,
tgram.types.Chat,
tgram.types.ChatFullInfo,
tgram.types.InlineQuery,
)
self._me = me if isinstance(self, BOUNDED_TYPES) else None
self._json = json

Expand Down

0 comments on commit faff6ab

Please sign in to comment.