mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 23:37:54 +00:00
fix edit message requiring new_content param, fix both edit and rp not using referenced message
This commit is contained in:
parent
d804303615
commit
8cad05ccda
4 changed files with 9 additions and 10 deletions
|
|
@ -6,11 +6,11 @@ namespace PluralKit.Bot;
|
|||
|
||||
public static class ContextArgumentsExt
|
||||
{
|
||||
public static (ulong? messageId, ulong? channelId) GetRepliedTo(this Context ctx)
|
||||
public static Message.Reference? GetRepliedTo(this Context ctx)
|
||||
{
|
||||
if (ctx.Message.Type == Message.MessageType.Reply && ctx.Message.MessageReference?.MessageId != null)
|
||||
return (ctx.Message.MessageReference.MessageId, ctx.Message.MessageReference.ChannelId);
|
||||
return (null, null);
|
||||
return ctx.Message.MessageReference;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static (ulong? messageId, ulong? channelId) ParseMessage(this Context ctx, string maybeMessageRef, bool parseRawMessageId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue