Skip to content

Commit

Permalink
添加alpha.16版本依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
KafCoppelia committed Jan 24, 2022
1 parent 0739cc8 commit 126e36d
Show file tree
Hide file tree
Showing 4 changed files with 863 additions and 9 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ _🍗 天天疯狂 🍗_
</a>

<a href="">
<img src="https://img.shields.io/badge/release-v0.1.5-orange">
<img src="https://img.shields.io/badge/release-v0.1.6-orange">
</a>

</p>
</p>

## 版本

v0.1.5
v0.1.6

⚠ 适配nonebot2-2.0.0alpha.16适配beta.1版本将会放在dev分支。
⚠ 适配nonebot2-2.0.0alpha.16适配beta.1版本参见beta.1分支

## 安装

1. 通过`pip``nb`安装;
1. 通过`pip``nb`安装,版本请指定`^0.1.6`

2. 读取文案的默认路径位于`./resource`下;

Expand All @@ -45,6 +45,7 @@ v0.1.5
## 命令

1. 天天疯狂,疯狂星期[一|二|三|四|五|六|日]

2. 输入**疯狂星期八**等不合法时间将提示;

## 本插件改自HoshinoBot疯狂星期四插件
Expand Down
5 changes: 3 additions & 2 deletions nonebot_plugin_crazy_thursday/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

_CRAZY_PATH = nonebot.get_driver().config.crazy_path
CRAZY_PATH = os.path.join(os.path.dirname(__file__), "resource") if not _CRAZY_PATH else _CRAZY_PATH
# crazy = on_command('疯狂星期四', aliases={"星期四", "KFC", "V我50"}, permission=GROUP, priority=15, block=True)

# V我50
crazy = on_regex(r'疯狂星期.', permission=GROUP, priority=15, block=True)

@crazy.handle()
async def random_post(bot: Bot, event: GroupMessageEvent, state: T_State):
async def _(bot: Bot, event: GroupMessageEvent, state: T_State):
iscrazy = re.search(r'(.*?)星期[一|二|三|四|五|六|日]', event.get_plaintext())
crazy_day = iscrazy.group(0)[-3:] if iscrazy is not None else None
if crazy_day is None:
Expand Down
Loading

0 comments on commit 126e36d

Please sign in to comment.