mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Merge 07959763ea into 4a947c01fc
This commit is contained in:
commit
6a3de3f80c
1 changed files with 11 additions and 1 deletions
|
|
@ -213,11 +213,21 @@ public class ProxyService
|
|||
{
|
||||
// Create reply embed
|
||||
var embeds = new List<Embed>();
|
||||
var content = "";
|
||||
|
||||
if (trigger.Type == Message.MessageType.Reply && trigger.MessageReference?.ChannelId == trigger.ChannelId)
|
||||
{
|
||||
var repliedTo = trigger.ReferencedMessage.Value;
|
||||
if (repliedTo != null)
|
||||
{
|
||||
if (trigger.Mentions.Length > 0
|
||||
&& repliedTo.Author.Id == trigger.Mentions[0].Id
|
||||
&& !(trigger.Content.Contains($"<@{repliedTo.Author.Id}>")
|
||||
|| trigger.Content.Contains($"<@!{repliedTo.Author.Id}>")))
|
||||
{
|
||||
content = $"*<@{repliedTo.Author.Id}>*\n";
|
||||
}
|
||||
|
||||
var (nickname, avatar) = await FetchReferencedMessageAuthorInfo(trigger, repliedTo);
|
||||
var embed = CreateReplyEmbed(match, trigger, repliedTo, nickname, avatar);
|
||||
if (embed != null)
|
||||
|
|
@ -228,7 +238,7 @@ public class ProxyService
|
|||
}
|
||||
|
||||
// Send the webhook
|
||||
var content = match.ProxyContent;
|
||||
content += match.ProxyContent;
|
||||
if (!allowEmbeds) content = content.BreakLinkEmbeds();
|
||||
|
||||
var messageChannel = await _cache.GetChannel(trigger.GuildId!.Value, trigger.ChannelId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue