Home>

How can I calculate the number of VC messages per x time (for example, the message per week)? Method Messages.Gethistory. Not suitable, because they consider it all time.

  • Answer # 1

    Record messages to the database. I use MySQL myself.

    Select * from `Messages` Where Time >
     Date_Sub (Now (), Interval '1 Minutes') and `Chat_id`= 1
    

    Also with Messages Grant Date: 2021-06-01 00:00:00 (DateTime)

  • Answer # 2

    Record messages to the database. I use MySQL myself.

    Select * from `Messages` Where Time >
     Date_Sub (Now (), Interval '1 Minutes') and `Chat_id`= 1
    

    Also with Messages Grant Date: 2021-06-01 00:00:00 (DateTime)