mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
🎨 修改方法名称
This commit is contained in:
parent
4882546c66
commit
e37f1c6165
@ -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}")
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
# 早上好
|
||||
|
||||
@ -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
|
||||
):
|
||||
|
||||
@ -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:
|
||||
"""判断被动技能是否可以发送
|
||||
|
||||
参数:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user