🎨 修改方法名称

This commit is contained in:
HibiKier 2024-08-30 02:45:27 +08:00
parent 4882546c66
commit e37f1c6165
4 changed files with 5 additions and 5 deletions

View File

@ -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()
@ -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}")

View File

@ -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)
# 早上好

View File

@ -42,7 +42,7 @@ class BroadcastManage:
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
):

View File

@ -6,7 +6,7 @@ from zhenxun.models.group_console import GroupConsole
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:
"""判断被动技能是否可以发送
参数: