From 2b0caae2dd154ba8bfdbd08ce8dc57edfed52ca7 Mon Sep 17 00:00:00 2001 From: Lonami Date: Mon, 6 Nov 2017 19:55:46 +0100 Subject: [PATCH] Create page --- Increasing-View-Count.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Increasing-View-Count.md diff --git a/Increasing-View-Count.md b/Increasing-View-Count.md new file mode 100644 index 0000000..1d45c9d --- /dev/null +++ b/Increasing-View-Count.md @@ -0,0 +1,12 @@ +It has been asked [quite](https://github.com/LonamiWebs/Telethon/issues/233) [a few](https://github.com/LonamiWebs/Telethon/issues/305) [times](https://github.com/LonamiWebs/Telethon/issues/409), and while I don't understand why so many people ask this, the solution is to use [`GetMessagesViewsRequest`](https://lonamiwebs.github.io/Telethon/methods/messages/get_messages_views.html), setting `increment=True`: +```python + +# Obtain `channel' through dialogs or through client.get_entity() or anyhow. +# Obtain `msg_ids' through `.get_message_history()` or anyhow. Must be a list. + +client(GetMessagesViewsRequest( + peer=channel, + id=msg_ids, + increment=True +)) +``` \ No newline at end of file