feat: add bot handlers for activity tracking, city weather queries, and historical data queries.

This commit is contained in:
2569718930@qq.com
2026-03-14 21:58:33 +08:00
parent 1c57a6f56e
commit 314cad82e6
3 changed files with 24 additions and 3 deletions
+8 -1
View File
@@ -23,14 +23,21 @@ class ActivityHandler:
"\u200b",
"\u200c",
"\u200d",
"\u200e",
"\u200f",
"\u2060",
"\u2066",
"\u2067",
"\u2068",
"\u2069",
"\u202a",
"\u202b",
"\u202c",
"\u202d",
"\u202e",
):
normalized = normalized.replace(marker, "")
normalized = normalized.lstrip()
if normalized.startswith("/") or normalized.startswith(""):
if normalized[:1] in {"/", "", "", "", "", ""}:
return
self.io_layer.track_group_text_activity(message)
+8 -1
View File
@@ -18,15 +18,22 @@ def _normalized_command_head(text: str | None) -> str:
"\u200b",
"\u200c",
"\u200d",
"\u200e",
"\u200f",
"\u2060",
"\u2066",
"\u2067",
"\u2068",
"\u2069",
"\u202a",
"\u202b",
"\u202c",
"\u202d",
"\u202e",
):
raw = raw.replace(marker, "")
raw = raw.strip()
if raw.startswith(""):
if raw[:1] in {"", "", "", "", ""}:
raw = "/" + raw[1:]
return raw.split(maxsplit=1)[0].lower() if raw else ""
+8 -1
View File
@@ -18,15 +18,22 @@ def _normalized_command_head(text: str | None) -> str:
"\u200b",
"\u200c",
"\u200d",
"\u200e",
"\u200f",
"\u2060",
"\u2066",
"\u2067",
"\u2068",
"\u2069",
"\u202a",
"\u202b",
"\u202c",
"\u202d",
"\u202e",
):
raw = raw.replace(marker, "")
raw = raw.strip()
if raw.startswith(""):
if raw[:1] in {"", "", "", "", ""}:
raw = "/" + raw[1:]
return raw.split(maxsplit=1)[0].lower() if raw else ""