Скрипт позволяет удалить определенный промежуток сообщений для двух сторон.
Скрипт работает для личных сообщений, сообщений в беседах, а также для сообщений внутри ботов.
Получите токен для страницы VK:
- Для упрощения процедуры можно воспользоваться сервисом vkhost.github.io.
Предпочительное приложение для получения токена: Kate Mobile
- Скачайте и установите Python 3.
- Откройте PowerShell, CMD или Terminal
- Скачайте необходимые библиотеки с помощью команды:
pip install requirements.txt
- Запустите скрипт с помощью команды:
python msg_delete.py --min_msg 1 --max_msg 15000000 --vk_token "VK Token"- Аргумент
--min_msgотвечает за ID первого сообщение, с которого нужно начать удаление. - Аргумент
--max_msgотвечает за ID последнего сообщения, которое нужно удалить. - Аргумент
--vk_tokenотвечает за ранее полученный токен VK
- Аргумент
В целях безопасности, крайне рекомендуется отозвать ранее полученный токен приложения. Чтобы отозвать токен, нужно:
- Перейти на страницу Внешних сервисов VK.
- Найти приложение, которое ранее было использовано для получения токена в разделе Внешние сервисы.
- Отозвать токен для данного приложения
The script allows you to delete a specific range of messages for both parties.
It works for private messages, group chats, and bot messages.
Get a token for your VK page:
- To simplify the procedure, you can use vkhost.github.io.
Preferred application for getting a token: Kate Mobile
- Download and install Python 3.
- Open PowerShell, CMD, or Terminal.
- Install the required libraries with the command:
pip install requirements.txt
- Run the script with the command:
python msg_delete.py --min_msg 1 --max_msg 15000000 --vk_token "VK Token"- The
--min_msgargument specifies the ID of the first message to delete. - The
--max_msgargument specifies the ID of the last message to delete. - The
--vk_tokenargument is the previously obtained VK token.
- The
For security reasons, it is highly recommended to revoke the previously obtained application token. To revoke it, you need to:
- Go to the VK External Services page.
- Find the application previously used to obtain the token in the External Services section.
- Revoke the token for this application.