UnCLAS-Prommer 2025-07-07 16:50:52 +08:00
commit 7b1f117af2
2 changed files with 10 additions and 1 deletions

2
.gitignore vendored
View File

@ -19,7 +19,7 @@ elua.confirmed
# C extensions
*.so
/results
config_backup/
# Distribution / packaging
.Python
build/

View File

@ -175,6 +175,9 @@ class SendHandler:
elif seg.type == "music":
song_id = seg.data
new_payload = self.build_payload(payload, self.handle_music_message(song_id), False)
elif seg.type == "videourl":
video_url = seg.data
new_payload = self.build_payload(payload, self.handle_videourl_message(video_url), False)
return new_payload
def build_payload(self, payload: list, addon: dict, is_reply: bool = False) -> list:
@ -251,6 +254,12 @@ class SendHandler:
"type": "music",
"data": {"type": "163", "id": song_id},
}
def handle_videourl_message(self, video_url: str) -> dict:
"""处理视频链接消息"""
return {
"type": "video",
"data": {"file": video_url},
}
def handle_ban_command(self, args: Dict[str, Any], group_info: GroupInfo) -> Tuple[str, Dict[str, Any]]:
"""处理封禁命令