import schedule
import time
from vk_api import VkApi
from threading import Thread
from vkbottle import Bot, load_blueprints_from_package
TOKEN = "******" #сообщества
vk_session = VkApi(token=TOKEN)
vk = vk_session.get_api()
bot = Bot(TOKEN)
for bp in load_blueprints_from_package("blueprints"):
bp.load(bot)
def main_loop():
thread = Thread(target=do_schedule)
thread.start()
def NAME():
vk.messages.send(
message ="TEXT",
chat_id = chat_id, # Если нужно выслать в чат
#peer_id = user_id, # Если нужно выслать в ЛС
random_id=0)
def do_schedule():
schedule.every().day.at("03:53").do(NAME)
while True:
schedule.run_pending()
time.sleep(1)
if __name__ == '__main__':
main_loop()
bot.run_forever()