skip to Main Content

I am currently using telebot but I am open to other things.
and can I also filter so it only reacts if it is from a specific user (not necessary).
example:

import telebot

if message == "Thank you"

print("received message")

doing something…….

2

Answers


  1. Chosen as BEST ANSWER

    so what I did was the following, I did not use telebot or any telegram api

    i used beautifulsoup to web scrape the time of the last message send. it looks something like this:

    from bs4 import BeautifulSoup
    import requests
    
    
    text = requests.get('Your_channellink').text
    soup = BeautifulSoup(text, 'lxml')
    Time = soup.find_all('time' , class_ = "time")[-1].text
    print(Time)
    

    hope this helps, feel free to ask questions if you have them.


  2. Read the docs and possibly share your code for helpful clarifications.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search