nonebot-plugin-werewolf 1.0.3__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/PKG-INFO +2 -2
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/README.md +1 -1
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/__init__.py +1 -1
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/utils.py +5 -1
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/pyproject.toml +1 -1
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/LICENSE +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/config.py +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/constant.py +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/game.py +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/matchers.py +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/ob11_ext.py +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/player.py +0 -0
- {nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/player_set.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nonebot-plugin-werewolf
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.4
|
4
4
|
Summary: Default template for PDM package
|
5
5
|
Author-Email: wyf7685 <wyf7685@163.com>
|
6
6
|
License: MIT
|
@@ -171,7 +171,7 @@ werewolf__override_preset='
|
|
171
171
|
<details>
|
172
172
|
<summary>更新日志</summary>
|
173
173
|
|
174
|
-
- 2024.09.01 v1.0.
|
174
|
+
- 2024.09.01 v1.0.4
|
175
175
|
|
176
176
|
- 优化玩家交互体验
|
177
177
|
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/utils.py
RENAMED
@@ -9,7 +9,7 @@ from nonebot.rule import to_me
|
|
9
9
|
from nonebot_plugin_alconna import MsgTarget, UniMessage, UniMsg
|
10
10
|
from nonebot_plugin_userinfo import EventUserInfo, UserInfo
|
11
11
|
|
12
|
-
from .game import player_preset
|
12
|
+
from .game import player_preset
|
13
13
|
|
14
14
|
|
15
15
|
def check_index(text: str, arrlen: int) -> int | None:
|
@@ -42,6 +42,8 @@ class InputStore:
|
|
42
42
|
|
43
43
|
|
44
44
|
def user_in_game(user_id: str, group_id: str | None) -> bool:
|
45
|
+
from .game import running_games
|
46
|
+
|
45
47
|
if group_id is not None and group_id not in running_games:
|
46
48
|
return False
|
47
49
|
games = running_games.values() if group_id is None else [running_games[group_id]]
|
@@ -51,6 +53,8 @@ def user_in_game(user_id: str, group_id: str | None) -> bool:
|
|
51
53
|
|
52
54
|
|
53
55
|
async def rule_in_game(event: Event, target: MsgTarget) -> bool:
|
56
|
+
from .game import running_games
|
57
|
+
|
54
58
|
if not running_games:
|
55
59
|
return False
|
56
60
|
if target.private:
|
File without changes
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/config.py
RENAMED
File without changes
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/constant.py
RENAMED
File without changes
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/game.py
RENAMED
File without changes
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/matchers.py
RENAMED
File without changes
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/ob11_ext.py
RENAMED
File without changes
|
{nonebot_plugin_werewolf-1.0.3 → nonebot_plugin_werewolf-1.0.4}/nonebot_plugin_werewolf/player.py
RENAMED
File without changes
|
File without changes
|