summaryrefslogtreecommitdiff
path: root/ATRI/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI/__init__.py')
-rw-r--r--ATRI/__init__.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/ATRI/__init__.py b/ATRI/__init__.py
index e69de29..23d4d2b 100644
--- a/ATRI/__init__.py
+++ b/ATRI/__init__.py
@@ -0,0 +1,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'
+
+async def startup_event() -> None:
+ logger.info('アトリは、高性能ですから!')
+ check_config()
+
+async def shutdown_event() -> None:
+ logger.info('Thanks for using!')
+ try:
+ shutil.rmtree(PLUGIN_INFO_PATH)
+ except:
+ pass
+
[email protected]_bot_connect
+async def az(bot):
+ await Send.send_to_superuser('test')
+
+
+from .exceptions import Error as Error
+from .request import Request as Request