mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-06 04:10:02 +08:00
feat✨: 添加B站转发解析功能
This commit is contained in:
@@ -78,7 +78,10 @@ async def _(matcher: Matcher, bot: Bot, session: EventSession, state: T_State):
|
||||
if user_id:
|
||||
command = state["_prefix"]["raw_command"]
|
||||
if state.get("_alc_result"):
|
||||
command = state["_alc_result"].source.command
|
||||
try:
|
||||
command = state["_alc_result"].source.command
|
||||
except AttributeError:
|
||||
pass
|
||||
if command:
|
||||
if _blmt.check(f"{user_id}__{command}"):
|
||||
await BanConsole.ban(
|
||||
|
||||
@@ -225,7 +225,7 @@ async def _(bot: Bot, event: GroupIncreaseNoticeEvent | GroupMemberIncreaseEvent
|
||||
img_file = path / f"{i}.png"
|
||||
if img_file.exists():
|
||||
msg_list.append(Image(img_file))
|
||||
if GroupConsole.is_block_task(group_id, "group_welcome"):
|
||||
if not GroupConsole.is_block_task(group_id, "group_welcome"):
|
||||
logger.info(f"发送群欢迎消息...", "入群检测", group_id=group_id)
|
||||
if msg_list:
|
||||
await MessageFactory(msg_list).send()
|
||||
@@ -293,5 +293,5 @@ async def _(bot: Bot, event: GroupDecreaseNoticeEvent | GroupMemberDecreaseEvent
|
||||
)
|
||||
operator_name = operator["card"] if operator["card"] else operator["nickname"]
|
||||
result = f"{user_name} 被 {operator_name} 送走了."
|
||||
if GroupConsole.is_block_task(str(event.group_id), "refund_group_remind"):
|
||||
if not GroupConsole.is_block_task(str(event.group_id), "refund_group_remind"):
|
||||
await group_decrease_handle.send(f"{result}")
|
||||
|
||||
@@ -45,7 +45,7 @@ class BroadcastManage:
|
||||
group.group_id, "broadcast", group.channel_id
|
||||
):
|
||||
target = PlatformUtils.get_target(
|
||||
bot, None, group.group_id, group.channel_id
|
||||
bot, None, group.channel_id or group.group_id
|
||||
)
|
||||
if target:
|
||||
await MessageFactory(message_list).send_to(target, bot)
|
||||
|
||||
Reference in New Issue
Block a user