✨ 新增农场帮助指令
This commit is contained in:
parent
8e30a27a41
commit
1fda07574c
20
command.py
20
command.py
@ -19,7 +19,9 @@ from nonebot_plugin_uninfo import Uninfo
|
|||||||
from nonebot_plugin_waiter import waiter
|
from nonebot_plugin_waiter import waiter
|
||||||
|
|
||||||
from zhenxun.configs.config import BotConfig
|
from zhenxun.configs.config import BotConfig
|
||||||
|
from zhenxun.configs.path_config import DATA_PATH
|
||||||
from zhenxun.services.log import logger
|
from zhenxun.services.log import logger
|
||||||
|
from zhenxun.utils._build_image import BuildImage
|
||||||
from zhenxun.utils.message import MessageUtils
|
from zhenxun.utils.message import MessageUtils
|
||||||
|
|
||||||
from .config import g_bSignStatus, g_sTranslation
|
from .config import g_bSignStatus, g_sTranslation
|
||||||
@ -95,7 +97,8 @@ diuse_farm = on_alconna(
|
|||||||
Subcommand("sign-in", help_text="农场签到"),
|
Subcommand("sign-in", help_text="农场签到"),
|
||||||
Subcommand("admin-up", Args["num?", int], help_text="农场下阶段"),
|
Subcommand("admin-up", Args["num?", int], help_text="农场下阶段"),
|
||||||
Subcommand("point-to-vipPoint", Args["num?", int], help_text="农场币换点券"),
|
Subcommand("point-to-vipPoint", Args["num?", int], help_text="农场币换点券"),
|
||||||
Subcommand("my-vipPoint", help_text="我的点券")
|
Subcommand("my-vipPoint", help_text="我的点券"),
|
||||||
|
Subcommand("farm-help", help_text="农场帮助"),
|
||||||
),
|
),
|
||||||
priority=5,
|
priority=5,
|
||||||
block=True,
|
block=True,
|
||||||
@ -695,3 +698,18 @@ async def _(session: Uninfo):
|
|||||||
).send(reply_to=True)
|
).send(reply_to=True)
|
||||||
|
|
||||||
|
|
||||||
|
diuse_farm.shortcut(
|
||||||
|
"农场帮助",
|
||||||
|
command="我的农场",
|
||||||
|
arguments=["farm-help"],
|
||||||
|
prefix=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@diuse_farm.assign("farm-help")
|
||||||
|
async def _(session: Uninfo):
|
||||||
|
savePath = DATA_PATH / "farm_res/html/help.png"
|
||||||
|
|
||||||
|
image = BuildImage(background=savePath)
|
||||||
|
|
||||||
|
await MessageUtils.build_message(image).send(reply_to=True)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user