Forichok / TelegramOnlineSpy

Simple telegram online spy logger bot
Mozilla Public License 2.0
393 stars 84 forks source link

Error message when target user online #25

Open koxle opened 2 years ago

koxle commented 2 years ago
Unhandled exception on start
Traceback (most recent call last):
  File "/usr/local/python3/lib/python3.7/site-packages/telethon/client/updates.py", line 467, in _dispatch_update
    await callback(event)
  File "spy.py", line 146, in start
    await event.respond(f'{get_interval(was_offline)}: {contact.name} went online.')
  File "spy.py", line 289, in get_interval
    d = divmod(date.total_seconds(),86400)  # days
AttributeError: 'str' object has no attribute 'total_seconds'

How can I resolve it? When the target user online, this error will appear and freeze the monitoring process

koxle commented 2 years ago

I am using python3.7.4 Running on CentOS 7

lauriolasw commented 2 years ago

Up