mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-26 03:47:24 +00:00
Rename Storage .destroy to .delete
This commit is contained in:
parent
a7c10bfb28
commit
c5498c3b4e
@ -779,7 +779,7 @@ class Client(Methods, BaseClient):
|
|||||||
def log_out(self):
|
def log_out(self):
|
||||||
"""Log out from Telegram and delete the *\\*.session* file.
|
"""Log out from Telegram and delete the *\\*.session* file.
|
||||||
|
|
||||||
When you log out, the current client is stopped and the storage session destroyed.
|
When you log out, the current client is stopped and the storage session deleted.
|
||||||
No more API calls can be made until you start the client and re-authorize again.
|
No more API calls can be made until you start the client and re-authorize again.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -793,7 +793,7 @@ class Client(Methods, BaseClient):
|
|||||||
"""
|
"""
|
||||||
self.send(functions.auth.LogOut())
|
self.send(functions.auth.LogOut())
|
||||||
self.stop()
|
self.stop()
|
||||||
self.storage.destroy()
|
self.storage.delete()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -113,5 +113,5 @@ class FileStorage(MemoryStorage):
|
|||||||
except sqlite3.OperationalError:
|
except sqlite3.OperationalError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def destroy(self):
|
def delete(self):
|
||||||
os.remove(self.database)
|
os.remove(self.database)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user