mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 14:27:54 +00:00
Add unit test project and some early tests
This commit is contained in:
parent
2d43c17f9e
commit
0f041c2e3c
6 changed files with 119 additions and 3 deletions
|
|
@ -8,10 +8,13 @@ namespace PluralKit.Bot
|
|||
{
|
||||
public class ProxyTagParser
|
||||
{
|
||||
public bool TryMatch(IEnumerable<ProxyMember> members, string input, out ProxyMatch result)
|
||||
public bool TryMatch(IEnumerable<ProxyMember> members, string? input, out ProxyMatch result)
|
||||
{
|
||||
result = default;
|
||||
|
||||
// Null input is valid and is equivalent to empty string
|
||||
if (input == null) return false;
|
||||
|
||||
// If the message starts with a @mention, and then proceeds to have proxy tags,
|
||||
// extract the mention and place it inside the inner message
|
||||
// eg. @Ske [text] => [@Ske text]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue