generated from A-kirami/nonebot-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
37 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
from nonebot.rule import to_me | ||
from nonebot.plugin import on_command | ||
from nonebot.adapters import Message | ||
from nonebot.params import CommandArg | ||
from .sanyao import print_lunar_info_and_bazi | ||
from nonebot.plugin import PluginMetadata | ||
|
||
weather = on_command("三爻", rule=to_me(), aliases={"三爻排盘", "三爻易"}, priority=10, block=True) | ||
from .config import Config | ||
|
||
@weather.handle() | ||
async def handle_function(args: Message = CommandArg()): | ||
# 提取参数纯文本作为地名,并判断是否有效 | ||
if location := args.extract_plain_text(): | ||
xx=print_lunar_info_and_bazi(location) | ||
await weather.finish(xx) | ||
else: | ||
await weather.finish("请输入参数 如/三爻 101") | ||
__plugin_meta__ = PluginMetadata( | ||
name="{三爻易数}", | ||
description="{三爻易数排盘}", | ||
usage="{插件用法}", | ||
|
||
type="{application}", | ||
# 发布必填,当前有效类型有:`library`(为其他插件编写提供功能),`application`(向机器人用户提供功能)。 | ||
|
||
homepage="{https://github.com/afterow/nonebot-plugin-sanyao}", | ||
# 发布必填。 | ||
|
||
config=Config, | ||
# 插件配置项类,如无需配置可不填写。 | ||
|
||
supported_adapters={"~onebot.v11", "~telegram"}, | ||
# 支持的适配器集合,其中 `~` 在此处代表前缀 `nonebot.adapters.`,其余适配器亦按此格式填写。 | ||
# 若插件可以保证兼容所有适配器(即仅使用基本适配器功能)可不填写,否则应该列出插件支持的适配器。 | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from nonebot.rule import to_me | ||
from nonebot.plugin import on_command | ||
from nonebot.adapters import Message | ||
from nonebot.params import CommandArg | ||
from .sanyao import print_lunar_info_and_bazi | ||
|
||
weather = on_command("三爻", rule=to_me(), aliases={"三爻排盘", "三爻易"}, priority=10, block=True) | ||
|
||
@weather.handle() | ||
async def handle_function(args: Message = CommandArg()): | ||
# 提取参数纯文本作为地名,并判断是否有效 | ||
if location := args.extract_plain_text(): | ||
xx=print_lunar_info_and_bazi(location) | ||
await weather.finish(xx) | ||
else: | ||
await weather.finish("请输入参数 如/三爻 101") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "nonebot-plugin-sanyao" | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
authors = [ | ||
{name="afterow", email="[email protected]"} | ||
] | ||
|