harmony icon indicating copy to clipboard operation
harmony copied to clipboard

[Feature Request] Regexp prefix in CommandClient

Open Oliver-makes-code opened this issue 3 years ago • 6 comments

What do you want to request? I would like to use a regular expression in the prefix of a CommandClient

Do you have anything to tell us about your request? Using a regexp as the prefix would allow for easier iteration through different combinations of characters, and would allow more complex prefixes.

Oliver-makes-code avatar Feb 04 '22 19:02 Oliver-makes-code

I don't think it's a bad idea but I am curious why ["!", "#", "#$$$!#$%#%"] etc wouldn't work for prefixes?

MierenManz avatar Feb 04 '22 23:02 MierenManz

I don't think it's a bad idea but I am curious why ["!", "#", "#$$$!#$%#%"] etc wouldn't work for prefixes?

Regex is more expressive, and a great fit for prefixes, they allow for very specific triggers, etc.

nebulatgs avatar Feb 04 '22 23:02 nebulatgs

I don't think it's a bad idea but I am curious why ["!", "#", "#$$$!#$%#%"] etc wouldn't work for prefixes?

Regex is more expressive, and a great fit for prefixes, they allow for very specific triggers, etc.

It also allows for multiple different prefixes using the same base. Having pf[!?;>] is much smaller than ["pf?","pf!","pf;","pf>"]

Oliver-makes-code avatar Feb 05 '22 04:02 Oliver-makes-code

Although this would be nice, I don’t really think its needed at the moment. You can just use a .map statement for what you provided as an example

Blocksnmore avatar Feb 05 '22 14:02 Blocksnmore

@DjDeveloper or @Helloyunho what do you think? Useful feature?

MierenManz avatar Jun 16 '22 14:06 MierenManz

@djdeveloper or @Helloyunho what do you think? Useful feature?

yes if you have message intent enabled

Helloyunho avatar Jun 16 '22 14:06 Helloyunho

closing

Helloyunho avatar Aug 26 '22 14:08 Helloyunho