feat: case-insensitive "text" keyword matching for proxy tags
This commit is contained in:
parent
2e3d771059
commit
1e5ba5f985
@ -26,6 +26,7 @@ namespace PluralKit.Bot
|
|||||||
{
|
{
|
||||||
// // Make sure there's one and only one instance of "text" in the example proxy given
|
// // Make sure there's one and only one instance of "text" in the example proxy given
|
||||||
var prefixAndSuffix = exampleProxy.Split("text");
|
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.ProxyMustHaveText;
|
||||||
if (prefixAndSuffix.Length > 2) throw Errors.ProxyMultipleText;
|
if (prefixAndSuffix.Length > 2) throw Errors.ProxyMultipleText;
|
||||||
return new ProxyTag(prefixAndSuffix[0], prefixAndSuffix[1]);
|
return new ProxyTag(prefixAndSuffix[0], prefixAndSuffix[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user