feat: add bot handlers for activity tracking, city weather queries, and historical data queries.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user