Files
zhenxun_bot/basic_plugins/shop/__init__.py
T

28 lines
509 B
Python
Raw Normal View History

from pathlib import Path
import nonebot
from nonebot.drivers import Driver
2021-11-04 16:11:50 +08:00
from configs.config import Config
from utils.decorator.shop import shop_register
driver: Driver = nonebot.get_driver()
2021-10-03 14:24:07 +08:00
2021-11-04 16:11:50 +08:00
Config.add_plugin_config(
2023-02-26 22:17:26 +08:00
"shop",
"IMPORT_DEFAULT_SHOP_GOODS",
True,
help_="导入商店自带的三个商品",
default_value=True,
type=bool,
2021-11-04 16:11:50 +08:00
)
2021-10-03 14:24:07 +08:00
nonebot.load_plugins(str(Path(__file__).parent.resolve()))
@driver.on_bot_connect
async def _():
await shop_register.load_register()