Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show all fields in tl objects when they are returned #12

Open
vanutp opened this issue Nov 18, 2021 · 0 comments
Open

Do not show all fields in tl objects when they are returned #12

vanutp opened this issue Nov 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@vanutp
Copy link
Collaborator

vanutp commented Nov 18, 2021

For example, when message is sent using await msg.reply('123'), Message object is returned and a lot of fields are shown, spamming in the chat.

For instance:

msg
TGPy> Message(
 id=123,
 peer_id=PeerChannel(
  channel_id=1123456789
 ),
 date=datetime.datetime(2021, 11, 18, 18, 7, 4, tzinfo=datetime.timezone.utc),
 message='msg',
 out=True,
 mentioned=False,
 media_unread=False,
 silent=False,
 post=False,
 from_scheduled=False,
 legacy=False,
 edit_hide=False,
 pinned=False,
 from_id=PeerUser(
  user_id=123456
 ),
 fwd_from=None,
 via_bot_id=None,
 reply_to=None,
 media=None,
 reply_markup=None,
 entities=[
 ],
 views=None,
 forwards=None,
 replies=MessageReplies(
  replies=0,
  replies_pts=...,
  comments=False,
  recent_repliers=[
  ],
  channel_id=None,
  max_id=None,
  read_max_id=None
 ),
 edit_date=None,
 post_author=None,
 grouped_id=None,
 restriction_reason=[
 ],
 ttl_period=None
)

Proposal is to show only commonly used fields, such as id, text, date, fwd_from, etc.
Also, this could be done for User, Channel, Chat too

@vanutp vanutp added the enhancement New feature or request label Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant