mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-04 02:26:11 +08:00
add path conf
This commit is contained in:
parent
1bd1bccc9b
commit
72a76b5964
@ -1,6 +1,10 @@
|
|||||||
|
import nonebot
|
||||||
|
from .plugin_config import PlugConfig
|
||||||
|
global_config = nonebot.get_driver().config
|
||||||
|
plugin_config = PlugConfig(**global_config.dict())
|
||||||
|
|
||||||
from . import config_manager
|
from . import config_manager
|
||||||
from . import config
|
from . import config
|
||||||
from . import scheduler
|
from . import scheduler
|
||||||
from . import send
|
from . import send
|
||||||
|
|
||||||
import nonebot
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from .utils import Singleton, supported_target_type
|
from .utils import Singleton, supported_target_type
|
||||||
|
from . import plugin_config
|
||||||
from os import path
|
from os import path
|
||||||
import nonebot
|
import nonebot
|
||||||
from tinydb import TinyDB, Query
|
from tinydb import TinyDB, Query
|
||||||
@ -7,6 +8,8 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
def get_config_path() -> str:
|
def get_config_path() -> str:
|
||||||
|
if plugin_config.hk_reporter_config_path:
|
||||||
|
return plugin_config.hk_reporter_config_path
|
||||||
working_dir = os.getcwd()
|
working_dir = os.getcwd()
|
||||||
data_dir = path.join(working_dir, 'data')
|
data_dir = path.join(working_dir, 'data')
|
||||||
if not path.isdir(data_dir):
|
if not path.isdir(data_dir):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user