tulir / telethon-session-sqlalchemy

SQLAlchemy backend for Telethon session storage
MIT License
39 stars 26 forks source link

Delete the session file and generate a new one? #10

Open nitanmarcel opened 5 years ago

nitanmarcel commented 5 years ago

What is the right way to delete a session. And generate a new one?

I tried with session.delete() and it seems it worked the first time but after I tried again I couldn't make it work.

The way I'm connecting is:

container = AlchemySessionContainer(DB_URI)
session = container.new_session("userbot")
ACLzz commented 4 years ago

I don't think that you still need this, but maybe someone need. After session.delete() you must call session.save() and it will be deleted.