Replace ping link embed with jump button
This commit is contained in:
parent
ae82bb4168
commit
9e9eaa7450
@ -189,12 +189,26 @@ namespace PluralKit.Bot
|
|||||||
if (msg.System.PingsEnabled)
|
if (msg.System.PingsEnabled)
|
||||||
{
|
{
|
||||||
// If the system has pings enabled, go ahead
|
// If the system has pings enabled, go ahead
|
||||||
var embed = new EmbedBuilder().Description($"[Jump to pinged message]({evt.JumpLink()})");
|
|
||||||
await _rest.CreateMessage(evt.ChannelId, new()
|
await _rest.CreateMessage(evt.ChannelId, new()
|
||||||
{
|
{
|
||||||
Content =
|
Content = $"Psst, **{msg.Member.DisplayName()}** (<@{msg.Message.Sender}>), you have been pinged by <@{evt.UserId}>.",
|
||||||
$"Psst, **{msg.Member.DisplayName()}** (<@{msg.Message.Sender}>), you have been pinged by <@{evt.UserId}>.",
|
Components = new []
|
||||||
Embed = embed.Build(),
|
{
|
||||||
|
new MessageComponent
|
||||||
|
{
|
||||||
|
Type = ComponentType.ActionRow,
|
||||||
|
Components = new[]
|
||||||
|
{
|
||||||
|
new MessageComponent
|
||||||
|
{
|
||||||
|
Style = ButtonStyle.Link,
|
||||||
|
Type = ComponentType.Button,
|
||||||
|
Label = "Jump",
|
||||||
|
Url = evt.JumpLink()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
AllowedMentions = new AllowedMentions {Users = new[] {msg.Message.Sender}}
|
AllowedMentions = new AllowedMentions {Users = new[] {msg.Message.Sender}}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user