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

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

Open
iceBear67 opened this issue Jun 24, 2023 · 0 comments
Open

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

iceBear67 opened this issue Jun 24, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers priority: low

Comments

@iceBear67
Copy link
Member

iceBear67 commented Jun 24, 2023

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.

@iceBear67 iceBear67 self-assigned this Jun 24, 2023
@iceBear67 iceBear67 added enhancement New feature or request good first issue Good for newcomers priority: low and removed waiting-for-review labels Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers priority: low
Projects
None yet
Development

No branches or pull requests

1 participant