mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
General bits of cleanup
This commit is contained in:
parent
4b69ef806a
commit
2702c45b4f
5 changed files with 7 additions and 21 deletions
|
|
@ -1,5 +1,4 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
|
@ -49,20 +48,6 @@ namespace PluralKit.Bot
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool TryMatchTags(string input, ProxyTag tag, out string inner)
|
||||
{
|
||||
// This just wraps TryMatchTagsInner w/ support for leading mentions
|
||||
var leadingMention = ExtractLeadingMention(ref input);
|
||||
|
||||
inner = "";
|
||||
if (!TryMatchTagsInner(input, tag, out var innerRaw)) return false;
|
||||
|
||||
// Add leading mentions back
|
||||
inner = leadingMention == null ? innerRaw : $"{leadingMention} {innerRaw}";
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private bool TryMatchTagsInner(string input, ProxyTag tag, out string inner)
|
||||
{
|
||||
inner = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue