Last active
May 23, 2020 10:48
-
-
Save alekssamos/3a2bd5380d580a6976f8c40431391939 to your computer and use it in GitHub Desktop.
Удаление всех диалогов кроме бесед и сообществ. Вставить в https://vk.com/dev/execute и выполнить несколько раз.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var messages = API.messages.getConversations({"count":200}); | |
| var i=-1; | |
| var d=0; | |
| var ids=[]; | |
| var peer_id=0; | |
| while(i<200) { | |
| i=i+1; | |
| peer_id = messages.items[i].conversation.peer.id; | |
| if(peer_id > 0 && peer_id < 2000000000) { | |
| if(d<=23) { | |
| if(API.messages.deleteConversation({"peer_id":peer_id})) { | |
| ids.push(peer_id); | |
| d=d+1; | |
| } | |
| } | |
| } | |
| } | |
| return {"deleted":d, "ids":ids}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment