diff --git a/Android/comm-bot-andro.py b/Android/comm-bot-andro.py index 5637c09..41f8a2a 100644 --- a/Android/comm-bot-andro.py +++ b/Android/comm-bot-andro.py @@ -1,11 +1,19 @@ import vk_api import time from colorama import Fore +import ctypes + +#support colors +kernel32 = ctypes.windll.kernel32 +kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7) def graph(): - print(" COMMENTS BOT (by blackcat)") - print(" author on vk: https://vk.com/krtvx") - print(" author on github: https://github.com/blackcatprog\n") + print(" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ") + print(" |C O M M E N T - B O T - V K| ") + print(" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ by blackcat ") + print("") + print(" author on vk: https://vk.com/krtvx") + print(" author on github: https://github.com/blackcatprog\n") def func(): try: @@ -40,6 +48,10 @@ def func(): print(Fore.RED + "Пост отсутствует") elif error[1:2] == "5": print(Fore.RED + "Ошибка авторизации") + elif error[1:4] == "213": + print("Нет доступа к записи") + except configparser.ParsingError: + print(Fore.RED + "Ошибка чтения конфига") except KeyboardInterrupt: print(Fore.RED + "\nВыполнен выход") diff --git a/Source/cfg.ini b/Source/cfg.ini index a7bcd3b..ae62a41 100644 --- a/Source/cfg.ini +++ b/Source/cfg.ini @@ -3,4 +3,4 @@ token = ваш токен user = id пользователя на стене у которого пост post = id поста text = текст комментария -time = время задержки \ No newline at end of file +time = задержка перед отправкой поста (в секундах) \ No newline at end of file diff --git a/Source/comm-bot.py b/Source/comm-bot.py index cb778ae..b0603e7 100644 --- a/Source/comm-bot.py +++ b/Source/comm-bot.py @@ -2,11 +2,19 @@ import configparser import time from colorama import Fore +import ctypes + +#support colors +kernel32 = ctypes.windll.kernel32 +kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7) def graph(): - print(" COMMENTS BOT (by blackcat)") - print(" author on vk: https://vk.com/krtvx") - print(" author on github: https://github.com/blackcatprog\n") + print(" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ") + print(" |C O M M E N T - B O T - V K| ") + print(" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ by blackcat ") + print("") + print(" author on vk: https://vk.com/krtvx") + print(" author on github: https://github.com/blackcatprog\n") def func(): try: @@ -43,6 +51,8 @@ def func(): print(Fore.RED + "Пост отсутствует") elif error[1:2] == "5": print(Fore.RED + "Ошибка авторизации") + elif error[1:4] == "213": + print("Нет доступа к записи") except configparser.ParsingError: print(Fore.RED + "Ошибка чтения конфига") except KeyboardInterrupt: diff --git a/Windows/comm-bot-win.exe b/Windows/comm-bot-win.exe index 530da5c..164812c 100644 Binary files a/Windows/comm-bot-win.exe and b/Windows/comm-bot-win.exe differ