mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor: tweak -raw usage (#341)
Co-authored-by: spiral <spiral@spiral.sh>
This commit is contained in:
parent
2ddef25177
commit
0553e42eca
4 changed files with 242 additions and 182 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue