psamim / telegram-cli-backup

A simple Lua script to backup Telegram messages into a CSV or sqlite database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export history limit

opened this issue · comments

Hi Samim,

If possible, please take a look at the source and see if you can make it work to keep history more than 500+
Right now I only can use 500 which is not adequate.
For 800 configuration, I got the following error after the messages have been exported:
*** lua: telegram-cli-backup/backup.lua:15: bad argument #1 to 'write' (string expected, got nil)

Thanks

@narbehaj
Welcome. I updated the script and now it checks for nil values upon write. I am not aware of any limits. Telegram may impose message limits but the script itself only asks for the last N messages from Telegram servers. See if your problem is solved or not.

Thank you for the update.
I got:
*** lua: /home/narbeh/tg/bin/telegram-cli-backup/backup.lua:39: attempt to concatenate global 'sql' (a nil value)

2000 value for history was fine, but no output for 3000

@narbehaj
Silly mistake!
Fixed, try again. :)

Update:

Now it works without getting error.

Thank you so much. Loved this.