refactor: tweak -raw usage (#341)

Co-authored-by: spiral <spiral@spiral.sh>
This commit is contained in:
Spectralitree
2021-08-27 19:20:14 -04:00
committed by spiral
parent 2ddef25177
commit 0553e42eca
4 changed files with 242 additions and 182 deletions

View File

@@ -71,6 +71,9 @@ namespace PluralKit.Bot
return matched;
}
public static bool MatchRaw(this Context ctx) =>
ctx.Match("r", "raw") || ctx.MatchFlag("r", "raw");
public static (ulong? messageId, ulong? channelId) MatchMessage(this Context ctx, bool parseRawMessageId)
{
if (ctx.Message.Type == Message.MessageType.Reply && ctx.Message.MessageReference?.MessageId != null)