18 lines
505 B
Python
18 lines
505 B
Python
import json
|
|
|
|
from . import handlers
|
|
from . import tasks
|
|
|
|
from vkbottle.bot import Bot as VkBot
|
|
|
|
|
|
if __name__ == '__main__':
|
|
with open('vk.json', 'r') as file:
|
|
config = json.load(file)
|
|
print('Конфигурация загружена.')
|
|
|
|
bot = VkBot(config['api_token'], labeler=handlers.labeler)
|
|
bot.api.config = config
|
|
bot.loop_wrapper.on_startup.append(tasks.startup_task(bot.api))
|
|
bot.loop_wrapper.add_task(tasks.daily_maintenance_task(bot.api))
|
|
bot.run_forever()
|