Files
PluralKit/PluralKit.Bot/Proxy/ProxyMatch.cs
Ske 49acc4d9e2 Refactor proxy handling code
- Move reaction handlers to the ReactionAdded event instead of
  ProxyService
- Split tag matching off into ProxyTagParser
- Split autoproxy matching off into Autoproxier
- General cleanup and simplification
2020-06-11 23:22:53 +02:00

25 lines
720 B
C#

#nullable enable
using PluralKit.Core;
namespace PluralKit.Bot
{
public struct ProxyMatch
{
public PKMember Member;
public string? Content;
public ProxyTag? ProxyTags;
public string? ProxyContent
{
get
{
// Add the proxy tags into the proxied message if that option is enabled
// Also check if the member has any proxy tags - some cases autoproxy can return a member with no tags
if (Member.KeepProxy && Content != null && ProxyTags != null)
return $"{ProxyTags.Value.Prefix}{Content}{ProxyTags.Value.Suffix}";
return Content;
}
}
}
}