Skip to content
This repository was archived by the owner on Nov 4, 2023. It is now read-only.
This repository was archived by the owner on Nov 4, 2023. It is now read-only.

feat: selector syntax for dash-console's command manager #45

@iceBear67

Description

@iceBear67

Summary

Add support for the `selector syntax'.

Motivation

By using this syntax, users will be able to locate someone without having an exact ID or UID.

Description

A selector syntax follows this scheme

.<PLATFORM_ID/any>[.g[.<SELECT PATTERN>.c] or [.<SELECT PATTERN>.m]][.n].[e]<SELECT PATTERN>.

Parts enclosed in <, > are MUST, while [, ] are optional.

[e]: use regex mode (off by default)

[.g]: the target is a ChatGroup.

[.c]: the target is a ChatChannel of the given ChatGroup. Use the default channel if not specified

[.m]: the target is an IMemberof the givenChatGroup. Incompatible with [.c]`.

[.n]: select targets by name.

Example:

  1. Select a member(id=1919810) of group 114514: .any.g.114514.m.1919810
  2. Select a contact whose name starts with A: .any.n.e"^A.+" 3.
  3. Select a group (id=114514) from Telegram: .telegram.g.114514.
  4. Select a group whose name starts with A: .any.g.n.e"^A.+".

A new session will be created if multiple selections are found. The user is prompted to select one of them.
This behaviour is disabled by default to avoid privacy concerns.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions