mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 06:47:56 +00:00
feat: case-insensitive "text" keyword matching for proxy tags
This commit is contained in:
parent
2e3d771059
commit
1e5ba5f985
1 changed files with 1 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
// // Make sure there's one and only one instance of "text" in the example proxy given
|
||||
var prefixAndSuffix = exampleProxy.Split("text");
|
||||
if (prefixAndSuffix.Length == 1) prefixAndSuffix = prefixAndSuffix[0].Split("TEXT");
|
||||
if (prefixAndSuffix.Length < 2) throw Errors.ProxyMustHaveText;
|
||||
if (prefixAndSuffix.Length > 2) throw Errors.ProxyMultipleText;
|
||||
return new ProxyTag(prefixAndSuffix[0], prefixAndSuffix[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue