2023-02-18 18:46:54 +08:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
import nonebot
|
|
|
|
|
from nonebot.drivers import Driver
|
|
|
|
|
|
2021-11-04 16:11:50 +08:00
|
|
|
from configs.config import Config
|
2022-10-30 18:28:10 +08:00
|
|
|
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-18 18:46:54 +08:00
|
|
|
"shop", "IMPORT_DEFAULT_SHOP_GOODS", True, help_="导入商店自带的三个商品", default_value=True
|
2021-11-04 16:11:50 +08:00
|
|
|
)
|
2021-10-03 14:24:07 +08:00
|
|
|
|
|
|
|
|
|
2023-02-18 18:46:54 +08:00
|
|
|
nonebot.load_plugins(str(Path(__file__).parent.resolve()))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@shop_register(
|
|
|
|
|
name=("好感度双倍加持卡Ⅰ", "好感度双倍加持卡Ⅱ", "好感度双倍加持卡Ⅲ"),
|
|
|
|
|
price=(30, 150, 250),
|
|
|
|
|
des=(
|
|
|
|
|
"下次签到双倍好感度概率 + 10%(谁才是真命天子?)(同类商品将覆盖)",
|
|
|
|
|
"下次签到双倍好感度概率 + 20%(平平庸庸)(同类商品将覆盖)",
|
|
|
|
|
"下次签到双倍好感度概率 + 30%(金币才是真命天子!)(同类商品将覆盖)",
|
|
|
|
|
),
|
|
|
|
|
load_status=bool(Config.get_config("shop", "IMPORT_DEFAULT_SHOP_GOODS")),
|
|
|
|
|
icon=(
|
|
|
|
|
"favorability_card_1.png",
|
|
|
|
|
"favorability_card_2.png",
|
|
|
|
|
"favorability_card_3.png",
|
|
|
|
|
),
|
|
|
|
|
**{"好感度双倍加持卡Ⅰ_prob": 0.1, "好感度双倍加持卡Ⅱ_prob": 0.2, "好感度双倍加持卡Ⅲ_prob": 0.3},
|
|
|
|
|
)
|
|
|
|
|
async def sign_card(user_id: int, group_id: int):
|
|
|
|
|
pass
|
2022-10-30 18:28:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@driver.on_bot_connect
|
|
|
|
|
async def _():
|
|
|
|
|
await shop_register.load_register()
|