mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-17 03:00:13 +00:00
Compare commits
2 commits
83f2d33c3d
...
0983179240
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0983179240 | ||
|
|
49ce00e675 |
3 changed files with 6 additions and 4 deletions
|
|
@ -201,7 +201,7 @@ public class ReactionAdded: IEventHandler<MessageReactionAddEvent>
|
|||
Type = ComponentType.Separator
|
||||
});
|
||||
components.AddRange(await _embeds.CreateMessageInfoMessageComponents(msg, true, config));
|
||||
await _rest.CreateMessage(dm, new MessageRequest { Components = components.ToArray(), Flags = Message.MessageFlags.IsComponentsV2 });
|
||||
await _rest.CreateMessage(dm, new MessageRequest { Components = components.ToArray(), Flags = Message.MessageFlags.IsComponentsV2, AllowedMentions = new AllowedMentions() });
|
||||
}
|
||||
catch (ForbiddenException) { } // No permissions to DM, can't check for this :(
|
||||
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ public class EmbedService
|
|||
};
|
||||
|
||||
var avatarURL = msg.Member?.AvatarFor(ctx).TryGetCleanCdnUrl();
|
||||
MessageComponent header = avatarURL == "" ? authorData : new MessageComponent()
|
||||
MessageComponent header = (avatarURL == "" || avatarURL == null) ? authorData : new MessageComponent()
|
||||
{
|
||||
Type = ComponentType.Section,
|
||||
Components = [authorData],
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using Autofac;
|
|||
using Myriad.Cache;
|
||||
using Myriad.Gateway;
|
||||
using Myriad.Rest;
|
||||
using Myriad.Rest.Types;
|
||||
using Myriad.Types;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
|
@ -76,13 +77,14 @@ public class InteractionContext
|
|||
});
|
||||
}
|
||||
|
||||
public async Task Reply(MessageComponent[] components = null)
|
||||
public async Task Reply(MessageComponent[] components = null, AllowedMentions? mentions = null)
|
||||
{
|
||||
await Respond(InteractionResponse.ResponseType.ChannelMessageWithSource,
|
||||
new InteractionApplicationCommandCallbackData
|
||||
{
|
||||
Components = components,
|
||||
Flags = Message.MessageFlags.Ephemeral | Message.MessageFlags.IsComponentsV2
|
||||
Flags = Message.MessageFlags.Ephemeral | Message.MessageFlags.IsComponentsV2,
|
||||
AllowedMentions = mentions ?? new AllowedMentions()
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue