Skip to content

Commit

Permalink
fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
Tian-que committed Mar 12, 2024
1 parent 376d074 commit 09efbee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nonebot/adapters/kaiheila/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def json_to_event(
json_data: Any,
self_id: Optional[str] = None,
*,
kaiheila_config: Optional[KaiheilaConfig] = None,
kaiheila_config: KaiheilaConfig,
) -> Union[OriginEvent, Event, None]:
if not isinstance(json_data, dict):
return None
Expand Down Expand Up @@ -405,7 +405,7 @@ def json_to_event(
if json_data["d"].get("author_id") == self_id :
return
# 屏蔽其他Bot消息
if json_data["d"].get("extra", {}).get("author", {}).get("bot") and kaiheila_config.kaiheila_ignore_else_bots:
if json_data["d"].get("extra", {}).get("author", {}).get("bot") and kaiheila_config.kaiheila_ignore_other_bots:
return
try:
data = json_data["d"]
Expand Down Expand Up @@ -447,7 +447,7 @@ def json_to_event(
sub_type = f".{sub_type}" if sub_type else ""

event_name: str = post_type + detail_type + sub_type
if kaiheila_config.ignore_events and event_name.startswith(kaiheila_config.ignore_events):
if kaiheila_config.kaiheila_ignore_events and event_name.startswith(kaiheila_config.kaiheila_ignore_events):
return

models = cls.get_event_model(event_name)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-adapter-kaiheila"
version = "0.3.2"
version = "0.3.3"
description = "kaiheila adapter for nonebot2"
authors = ["Tian-que <1605206150@qq.com>", "ssttkkl <huang.wen.long@hotmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 09efbee

Please sign in to comment.