包含hd_chinese_subtitles
This commit is contained in:
@@ -9,7 +9,7 @@ command-format = """
|
||||
# MongoDB 连接
|
||||
mongo_uri = "mongodb+srv://readonly:cS9NSuiJ1ebHnUL0@cluster0.8mosa.mongodb.net/sehuatang?retryWrites=true&w=majority"
|
||||
db = "sehuatang"
|
||||
collections = ["asia_codeless_originate", "asia_mosaic_originate","4k_video"]
|
||||
collections = ["hd_chinese_subtitles", "asia_codeless_originate", "asia_mosaic_originate","4k_video"]
|
||||
|
||||
# 尝试匹配的字段名(存在其一即可)
|
||||
search_fields = ["number"]
|
||||
|
||||
@@ -71,7 +71,7 @@ class FanhaoSearchPlugin(MessagePluginInterface):
|
||||
)
|
||||
self.mongo_db_name = cfg.get("db", "sehuatang")
|
||||
self.collections = cfg.get(
|
||||
"collections", ["asia_codeless_originate", "asia_mosaic_originate","4k_video"]
|
||||
"collections", ["hd_chinese_subtitles", "asia_codeless_originate", "asia_mosaic_originate", "4k_video"]
|
||||
)
|
||||
self.search_fields = cfg.get("search_fields", ["number"]) # 可能的字段名
|
||||
|
||||
@@ -236,7 +236,8 @@ class FanhaoSearchPlugin(MessagePluginInterface):
|
||||
# 参数检查
|
||||
parts = content.split(" ")
|
||||
if len(parts) < 2:
|
||||
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}", sender)
|
||||
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}",
|
||||
sender)
|
||||
return False, "命令格式错误"
|
||||
|
||||
if roomid and gbm.get_group_permission(roomid, self.feature) == PermissionStatus.DISABLED:
|
||||
@@ -248,7 +249,8 @@ class FanhaoSearchPlugin(MessagePluginInterface):
|
||||
f"[{self.name}] 收到查询 command={command} raw='{raw_code}' normalized='{user_code}' db={self.mongo_db_name} collections={self.collections}"
|
||||
)
|
||||
if not user_code:
|
||||
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}", sender)
|
||||
await bot.send_text_message((roomid if roomid else sender), f"❌命令格式错误!\n{self.command_format}",
|
||||
sender)
|
||||
return False, "命令格式错误"
|
||||
|
||||
try:
|
||||
@@ -269,5 +271,3 @@ class FanhaoSearchPlugin(MessagePluginInterface):
|
||||
|
||||
def get_plugin():
|
||||
return FanhaoSearchPlugin()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user