Skip to content

Commit

Permalink
🎨 修改方法名称
Browse files Browse the repository at this point in the history
  • Loading branch information
HibiKier committed Aug 29, 2024
1 parent 4882546 commit e37f1c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit e37f1c6

Please sign in to comment.