nonebot-plugin-werewolf 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl

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.
@@ -8,7 +8,7 @@ require("nonebot_plugin_waiter")
8
8
  from . import matchers as matchers
9
9
  from .config import Config
10
10
 
11
- __version__ = "1.0.3"
11
+ __version__ = "1.0.4"
12
12
  __plugin_meta__ = PluginMetadata(
13
13
  name="狼人杀",
14
14
  description="适用于 Nonebot2 的狼人杀插件",
@@ -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, running_games
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-werewolf
3
- Version: 1.0.3
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.3
174
+ - 2024.09.01 v1.0.4
175
175
 
176
176
  - 优化玩家交互体验
177
177
 
@@ -1,7 +1,7 @@
1
- nonebot_plugin_werewolf-1.0.3.dist-info/METADATA,sha256=0co-Cgj6W-98W7ZyDOR8u7phucnJUIstiq0vtwQbLf8,5815
2
- nonebot_plugin_werewolf-1.0.3.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
- nonebot_plugin_werewolf-1.0.3.dist-info/licenses/LICENSE,sha256=B_WbEqjGr6GYVNfEJPY31T1Opik7OtgOkhRs4Ig3e2M,1064
4
- nonebot_plugin_werewolf/__init__.py,sha256=CajWxyaRax2kotzc4w5IcJbdmc07ysCbSNGKve5wIvw,734
1
+ nonebot_plugin_werewolf-1.0.4.dist-info/METADATA,sha256=AkymAo7r7BJckqlRFyjnFBGYCKhpyREppGHPGFowtx8,5815
2
+ nonebot_plugin_werewolf-1.0.4.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
+ nonebot_plugin_werewolf-1.0.4.dist-info/licenses/LICENSE,sha256=B_WbEqjGr6GYVNfEJPY31T1Opik7OtgOkhRs4Ig3e2M,1064
4
+ nonebot_plugin_werewolf/__init__.py,sha256=Ia0RlpR6eFLWMI-0OyLGMbBp5W7Oh6s96r45rGWGtDw,734
5
5
  nonebot_plugin_werewolf/config.py,sha256=3O63P1pjvJEwgOwxApAHbKQzvCR1zoG5UjTClZ_OJts,315
6
6
  nonebot_plugin_werewolf/constant.py,sha256=kMn5DHXdYuOXeGpJjnG_WX9AD-OytLKXSjrww0T5OYg,1234
7
7
  nonebot_plugin_werewolf/game.py,sha256=PI6j-T70Logax87fpmf8HBS3LihF7J40nespvoNFyus,13449
@@ -9,5 +9,5 @@ nonebot_plugin_werewolf/matchers.py,sha256=o0LdO7AOUjTPcNaNTHbmw5d0CcnMc7mX8oko0
9
9
  nonebot_plugin_werewolf/ob11_ext.py,sha256=I6bPCv5SgAStTJuvBl5F7wqgiksWeFkb4R7n06jXprA,2399
10
10
  nonebot_plugin_werewolf/player.py,sha256=z_yVjqfDOxnQlDtDxSbdmvEapIQikkho2hCjb46zqKY,13799
11
11
  nonebot_plugin_werewolf/player_set.py,sha256=ptNZb13H8DgcjQ9tm3uT2ISXnnWioQG1W4R506HlaMU,3057
12
- nonebot_plugin_werewolf/utils.py,sha256=KfCBdiy5pxkOf1k1EOg8NLe5-viiCCm72vPP6lobudQ,6127
13
- nonebot_plugin_werewolf-1.0.3.dist-info/RECORD,,
12
+ nonebot_plugin_werewolf/utils.py,sha256=B8YipTx96k2Y-trrCDfzRQnmHs-yAMcU5-g8FUrRQ64,6186
13
+ nonebot_plugin_werewolf-1.0.4.dist-info/RECORD,,