Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 修改方法名称 #1591

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zhenxun/builtin_plugins/platform/qq/group_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async def _(bot: Bot, event: GroupIncreaseNoticeEvent | GroupMemberIncreaseEvent
img_file = path / f"{i}.png"
if img_file.exists():
msg_list.append(img_file)
if not await CommonUtils.is_block("group_welcome", group_id):
if not await CommonUtils.task_is_block("group_welcome", group_id):
logger.info("发送群欢迎消息...", "入群检测", group_id=group_id)
if msg_list:
await MessageUtils.build_message(msg_list).send()
Expand Down Expand Up @@ -314,5 +314,5 @@ async def _(bot: Bot, event: GroupDecreaseNoticeEvent | GroupMemberDecreaseEvent
)
operator_name = operator["card"] or operator["nickname"]
result = f"{user_name} 被 {operator_name} 送走了."
if not await CommonUtils.is_block("refund_group_remind", str(event.group_id)):
if not await CommonUtils.task_is_block("refund_group_remind", str(event.group_id)):
await group_decrease_handle.send(f"{result}")
2 changes: 1 addition & 1 deletion zhenxun/builtin_plugins/scheduler/morning.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def _():


async def check(group_id: str) -> bool:
return not await CommonUtils.is_block("morning_goodnight", group_id)
return not await CommonUtils.task_is_block("morning_goodnight", group_id)


# 早上好
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def send(
error_count = 0
for group in group_list:
try:
if not await CommonUtils.is_block(
if not await CommonUtils.task_is_block(
group.group_id,
"broadcast", # group.channel_id
):
Expand Down
2 changes: 1 addition & 1 deletion zhenxun/utils/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class CommonUtils:

@classmethod
async def is_block(cls, module: str, group_id: str | None) -> bool:
async def task_is_block(cls, module: str, group_id: str | None) -> bool:
"""判断被动技能是否可以发送

参数:
Expand Down
Loading