Closed PeterHunt closed 1 year ago
Good question. Let me think about it ...
Good question. Let me think about it ...
That would be great! I have a BOT which currently has about 1800 users but I noticed that several are not inactive no more and would like to kick them from the BOT periodically. They already are being removed when they delete or block the BOT themselve but not upon inactivity.
Thanks for looking into it :)
@PeterHunt I did some research and in the end i believe that the BOT API does not support anything like that: see https://stackoverflow.com/questions/33844290/how-to-get-telegram-channel-users-list-with-telegram-bot-api
The BOT only receives messages from channels and along the message you get additional information like the user id or chat id... but there is nothing that a bot can call to resolve a username from id or statistics like "last seen".
The only chance you have is maintaining these statistics on your own in your flow by storing the user id (with channel id) together with the date in a database and to the logic there. This will only work from the time the user entered the channel.
I will keep this in my mind and will implement it as soon as the BOT API will support it.
Thanks for the research and your feedback! :)
Hello,
Is there any way of retrieving a users last seen timestamp?
Kind regards,
Peter Hunt