blob: 23d4d2b10980e86b1fd16fe62eb0616f99b441d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : __init__.py
@Time : 2021/01/26 11:21:07
@Author : Kyomotoi
@Contact : [email protected]
@Github : https://github.com/Kyomotoi
@License : Copyright © 2018-2020 Kyomotoi, All Rights Reserved.
'''
__author__ = 'kyomotoi'
import shutil
from pathlib import Path
from .log import logger
from .config import check_config
from .service.send import Send
from main import driver
PLUGIN_INFO_PATH = Path('.') / 'ATRI' / 'data' / 'service' / 'plugins'
@driver.on_startup
async def startup_event() -> None:
logger.info('アトリは、高性能ですから!')
check_config()
@driver.on_shutdown
async def shutdown_event() -> None:
logger.info('Thanks for using!')
try:
shutil.rmtree(PLUGIN_INFO_PATH)
except:
pass
@driver.on_bot_connect
async def az(bot):
await Send.send_to_superuser('test')
from .exceptions import Error as Error
from .request import Request as Request
|