Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/mcmod/__init__.py

24 lines
839 B
Python
Raw Normal View History

2022-01-16 01:44:31 +00:00
from core.component import on_command
2022-06-28 06:11:03 +00:00
from core.builtins.message import MessageSession
2022-01-16 01:44:31 +00:00
from .mcmod import mcmod as m
mcmod = on_command(
bind_prefix='mcmod',
desc='从 MCMOD 获取 Minecraft Mod 信息',
2022-02-22 13:03:30 +00:00
developers=['Dianliang233', 'HornCopper', 'DrLee_lihr'],
alias={'moddetails': 'mcmod details'}
2022-01-16 01:44:31 +00:00
)
2022-01-20 12:13:03 +00:00
2022-01-16 01:44:31 +00:00
@mcmod.handle('<mod_name> {通过模组名获取模组简介及链接,可使用无歧义简写和准确中文。}')
async def main(msg: MessageSession):
message = await m(msg.parsed_msg['<mod_name>'])
2022-05-21 16:04:29 +00:00
await msg.finish(message)
2022-02-22 13:03:30 +00:00
@mcmod.handle('details <content> {通过 Mod 内容的名称获取模组简介及链接,可使用物品/方块/实体的 ID 或准确中文。}')
async def main(msg: MessageSession):
message = await m(msg.parsed_msg['<content>'], detail=True)
2022-05-21 16:04:29 +00:00
await msg.finish(message)